lmerG | R Documentation |
This function restricts the variance-covariance matrix of random effects G
to be either
diagonal ('cov=FALSE') or to take any non-zero covariances into account (default, 'cov=TRUE').
lmerG(obj, cov = FALSE)
obj |
(object) inheriting from class 'lmerMod' |
cov |
(logical) TRUE = in case of non-zero covariances a block diagonal matrix will be constructed, FALSE = a diagonal matrix with all off-diagonal element being equal to zero will be contructed |
This function is not intended to be called directly by users and therefore not exported!
(Matrix) representing the variance-covariance structure of random effects G
Andre Schuetzenmeister andre.schuetzenmeister@roche.com
## Not run:
library(lme4)
data(Orthodont)
Ortho <- Orthodont
Ortho$age2 <- Ortho$age - 11
Ortho$Subject <- factor(as.character(Ortho$Subject))
fit <-lmer(distance~Sex+Sex:age2+(age2|Subject), Ortho)
G1 <- VCA:::lmerG(fit, cov=FALSE)
G2 <- VCA:::lmerG(fit, cov=TRUE)
G1[1:10,1:10]
G2[1:10,1:10]
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.