gremlinR {gremlin} | R Documentation |
Create and fit linear mixed-effect model (Gaussian data) or checking if an object is a fitted model.
gremlinR(formula, random = NULL, rcov = ~units, data = NULL, ginverse = NULL, Gstart = NULL, Rstart = NULL, Bp = NULL, maxit = 20, algit = NULL, vit = 10, v = 1, ...) mkModMats(formula, random = NULL, rcov = ~units, data = NULL, subset = NULL, ginverse = NULL, na.action = na.pass, offset = NULL, contrasts = NULL, Xsparse = TRUE, ...)
formula |
A |
random |
A |
rcov |
A |
data |
A |
ginverse |
A |
Gstart |
A |
Rstart |
A |
Bp |
A prior specification for fixed effects. |
maxit |
An |
algit |
A |
vit |
An |
v |
An |
... |
Additional arguments to be passed to control the model fitting. |
subset |
An expression for the subset of |
na.action |
What to do with NAs. |
offset |
Should an offset be specified. |
contrasts |
Specify the type of contrasts for the fixed effects. |
Xsparse |
Should sparse matrices be used for the fixed effects design matrix. |
A list
of class gremlin
or gremlinModMats
:
The model call
.
A list
of the model matrices used to construct the
mixed model equations.
The response vector.
The number of responses.
The number of columns of the original response.
The fixed effects design matrix.
The number of columns in X.
The residual design matrix.
A list of the design matrices for each random term.
The number of parameters in the G structure.
A list of generalized inverse matrices.
The log-determinants of the generalized inverse matrices - necessary to calculate the log-likelihood.
A matrix
of details about each iteration.
A two column matrix
of solutions and their sampling
variances from the mixed model.
A vector
of residual deviations, response minus
the values expected based on the solutions, corresponding to the order
in modMats$y
.
A matrix
of (co)variance components at the last
iteration.
A matrix
of values containing the Average Information
matrix, or second partial derivatives of the likelihood with respect to
the (co)variance components. The inverse of this matrix gives the
sampling variances of the (co)variance components.
A single column matrix
of first derivatives of
the (co)variance parameters with respect to the log-Likelihood.
mkModMats
: Generates model matrices.
Henderson Mrode. 2005.
library(nadiv) Ainv <- makeAinv(Mrode3[-c(1:2), 1:3])$Ainv mod11 <- gremlinR(WWG11 ~ sex - 1, random = ~ calf, data = Mrode11, ginverse = list(calf = Ainv), Gstart = matrix(0.2), Rstart = matrix(0.4), maxit = 10, v = 2) is(mod11)