Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
legTools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leg
legTools
Commits
199a7363
Commit
199a7363
authored
Sep 16, 2015
by
Walmes Zeviani
Browse files
Options
Downloads
Patches
Plain Diff
Files generated by the build package process.
parent
f90bd1ff
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
NAMESPACE
+2
-0
2 additions, 0 deletions
NAMESPACE
man/apcMatrix.Rd
+61
-0
61 additions, 0 deletions
man/apcMatrix.Rd
man/equalizeLevels.Rd
+49
-0
49 additions, 0 deletions
man/equalizeLevels.Rd
with
112 additions
and
0 deletions
NAMESPACE
+
2
−
0
View file @
199a7363
# 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)
...
...
This diff is collapsed.
Click to expand it.
man/apcMatrix.Rd
0 → 100644
+
61
−
0
View file @
199a7363
% 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}.
}
This diff is collapsed.
Click to expand it.
man/equalizeLevels.Rd
0 → 100644
+
49
−
0
View file @
199a7363
% 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}.
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment