| confint.merMod {lme4} | R Documentation |
Compute confidence intervals on the parameters of a *lmer()
model fit (of class"merMod").
## S3 method for class 'merMod'
confint(object, parm, level = 0.95,
method = c("profile", "Wald", "boot"), zeta,
nsim = 500, boot.type = "perc", quiet = FALSE,
oldNames = TRUE, ...)
object |
a fitted [ng]lmer model |
parm |
parameters (specified by integer position) |
level |
confidence level < 1, typically above 0.90. |
method |
a |
zeta |
(for |
nsim |
number of simulations for parametric bootstrap intervals. |
boot.type |
bootstrap confidence interval type. |
quiet |
(logical) suppress messages about computationally intensive profiling? |
oldNames |
(logical) use old-style names for
|
... |
additional parameters to be passed to
|
Depending on the method specified, confint() computes
confidence intervals by
"profile":computing a likelihood profile and finding the appropriate cutoffs based on the likelihood ratio test;
"Wald":approximate the confidence intervals (of fixed-effect parameters only) based on the estimated local curvature of the likelihood surface;
"boot":perform parametric
bootstrapping with confidence intervals computed from the
bootstrap distribution according to boot.type (see
boot.ci).
a numeric table of confidence intervals
fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)
fm1W <- confint(fm1, method="Wald")# very fast, but ....
fm1W
testLevel <- if (nzchar(s <- Sys.getenv("LME4_TEST_LEVEL"))) as.numeric(s) else 1
if(interactive() || testLevel >= 3) {
## ~20 seconds, MacBook Pro laptop
system.time(fm1P <- confint(fm1, method="profile", ## default
oldNames = FALSE))
## ~ 40 seconds
system.time(fm1B <- confint(fm1,method="boot",
.progress="txt", PBargs=list(style=3)))
} else
load(system.file("testdata","confint_ex.rda",package="lme4"))
fm1P
fm1B