Skip to content
Snippets Groups Projects
Commit 199a7363 authored by Walmes Zeviani's avatar Walmes Zeviani
Browse files

Files generated by the build package process.

parent f90bd1ff
Branches
No related tags found
No related merge requests found
# Generated by roxygen2 (4.1.1): do not edit by hand
export(apcMatrix)
export(biasBox)
export(equalizeLevels)
export(knit2wpCrayon)
export(loessGui)
export(panel.segplot.by)
......
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/apcMatrix.R
\name{apcMatrix}
\alias{apcMatrix}
\title{All pairwise comparisons matrix (Tukey contrasts)}
\usage{
apcMatrix(lfm, lev = NULL)
}
\arguments{
\item{lfm}{a \eqn{k\times p} matrix where each line defines a linear
function to estimate a lsmean (or any linear function). In
general, these matrices are obtained using
\code{doBy::LSmatrix()}.}
\item{lev}{a character vector with dimension equals to the numbers of
lines of \code{lfm} matrix (\eqn{k}). Default is \code{NULL} and
the row names of code{lfm} is used. If row names is also
\code{NULL}, an integer sequence is used to identify the
comparisons.}
}
\value{
a \eqn{K\times p} matrix with the linear functions that
define all pairwise contrasts. \eqn{K} is \eqn{k\choose 2}.
}
\description{
This function takes a matrix where each line defines a
linear function of the parameters to estimate a marginal mean
(aka least squares means) and return the matrix that define the
contrasts among these means. All pairwise contrasts are returned
(aka Tukey contrasts). The matrix with these contrasts can be
passed to \code{multcomp::glht()} to estimate them or used in
explicit matricial calculus.
}
\examples{
## A matrix of linear functions corresponding to the cell means
## parametrization.
X <- diag(4)
## If no rownames an integer sequence is used.
rownames(X)
apcMatrix(X)
## With rownames, those are used.
rownames(X) <- letters[nrow(X):1]
apcMatrix(X)
## Passing names by the argument `lev=`.
apcMatrix(X, lev=LETTERS[1:nrow(X)])
## Using the special case with attribute "grid" present in matrices
## returned by doBy::LSmeans() and doBy::LSmatrix().
attr(X, "grid") <- data.frame(n=LETTERS[1:nrow(X)])
apcMatrix(X)
}
\author{
Walmes Zeviani, \email{walmes@ufpr.br}
}
\seealso{
\link[doBy]{LSmatrix}.
}
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/equalizeLevels.R
\name{equalizeLevels}
\alias{equalizeLevels}
\title{Make that to data frames have the same factor levels}
\usage{
equalizeLevels(target, ref)
}
\arguments{
\item{target}{the target data frame that will have factor levels
reordered.}
\item{ref}{the reference data frame that contains the desired level
order.}
}
\value{
the first data data frame with the levels in a new order.
}
\description{
If two data frames have factor or character columns with
the same name, those in the first will have the same level order
as those in the second. So, in terms of factor columns, these
data frames will have the same levels in the same
order. Character columns in the first will be converted to factor
if they aren't. This function is useful to assing to the data
frame returned in the \code{grid} attribute returned by
\code{doBy::LSmeans()} or \code{doBy::LSmatrix()} the same order
to the levels present in the data frame used to fit the model and
estimate the parameters.
}
\examples{
a <- data.frame(
Species=as.character(sample(iris$Species, size=10, replace=TRUE)),
stringsAsFactors=FALSE)
str(a)
levels(a$Species)
levels(iris$Species)
b <- equalizeLevels(target=a, ref=iris)
str(b)
}
\author{
Walmes Zeviani, \email{walmes@ufpr.br}
}
\seealso{
\link[doBy]{LSmeans}, \link[doBy]{LSmatrix}.
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment