lmer(formula, data, family, method, control, start,
subset, weights, na.action, offset, contrasts,
model, ...)## S3 method for class 'formula':
lmer(formula, data, family, method,
control, start, subset, weights, na.action, offset, contrasts,
model, \dots)
~
operator and the terms, separated by +
operators, on
the right. The vertical bar character
formula
. By default the variables are taken from the
environment from which lmer
is called.glm
. If family
is
missing then a linear mixed model is fit; otherwise a generalized
linear mixed model is fit."REML"
indicating that the model should be fit by
maximizing the restricted log-likelihood. The alternative is
"ML"
indicating that the log-likelihood shou"Omega"
in a
fitted model. Only the upper triangle of these symmetric matrices
should be stored.lm
; see there for
details.frame
)."lmer "
.
There are many methods applicable to "lmer"
objects, see the
above help page.lme
function from the
Additional standard arguments to model-fitting functions can be passed
to lmer
.
[object Object],[object Object],[object Object],[object Object]
lmer-class
, lm
(fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy))
(fm2 <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject), sleepstudy))
anova(fm1, fm2)
Run the code above in your browser using DataLab