Description Usage Arguments Examples
The only output from this function is the result of an optimization over the covariance parameters.
1 |
y |
response vector |
mmFE |
model matrix for the fixed effects |
mmRE |
template model matrix for the random effects (or optionally a list of such matrices) |
grp |
grouping factor for the random effects (or optionally a list of such factors) |
weights |
weights |
offset |
offset |
REML |
should restricted maximum likelihood be used? |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | library(lme4pureR)
library(lme4)
library(minqa)
set.seed(1)
n <- 1000
x <- rnorm(n)
z <- rnorm(n)
X <- cbind(1, x)
ZZ <- cbind(1, z)
grp <- gl(n/5,5)
RE <- mkRanefStructures(list(grp), list(ZZ))
Z <- t(RE$Zt)
y <- as.numeric(X%*%rnorm(ncol(X)) + Z%*%rnorm(ncol(Z)) + rnorm(n))
m <- lmer.fit(y,X,ZZ,grp)
m$par
Lambdat <- RE$Lambdat
Lambdat
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.