I am running into what might be a bug in confint.merMod() with boot.type="norm". The error occurs on the line near the end of confint.merMod() that labels the value: dimnames(citab) <- list(names(bb[["t0"]]), pct)
but appears to arise a few lines up, where the expression that creates citab is hardwired to extract from the structure created when boot.type="perc":
citab <- t(sapply(bci, function(x) x[["percent"]][4:5]))
More details appear below. I don't understand the structures enough to propose a fix other than suggesting that the line above should extract in a way dependent on the value of boot.type.
Package: lme4
Version: 1.1-6
platform x86_64-w64-mingw32
version.string R version 3.1.0 (2014-04-10)
=================================================================================================
Here are the last few lines of confint.merMod():
bb <- bootMer(object, bootFun, nsim = nsim, ...)
bci <- lapply(seq_along(bb$t0), boot.out = bb, boot::boot.ci,
type = boot.type, conf = level)
citab <- t(sapply(bci, function(x) x[["percent"]][4:5]))
a <- (1 - level)/2
a <- c(a, 1 - a)
pct <- format.perc(a, 3)
dimnames(citab) <- list(names(bb[["t0"]]), pct)
pnames <- rownames(citab)
if (missing(parm)) parm <- pnames else if (is.numeric(parm)) parm <- pnames[parm]
citab[parm, ]
}, stop("unknown confidence interval method"))
=================================================================================================
This is the model and the call to confint() followed by verbose output and error message:
xmodsp
Linear mixed model fit by REML ['lmerMod']
Formula: im.pneum ~ 0 + group + (0 + group | aco.id)
Data: mydata
REML criterion at convergence: 10837.66
Random effects:
Groups Name Std.Dev. Corr
aco.id groupFH 0.03173
groupFL 0.05405 1.00
Residual 0.41305
Number of obs: 10022, groups: aco.id, 152
Fixed Effects:
groupFH groupFL
1.135 1.239
I am running into what might be a bug in confint.merMod() with
boot.type="norm". The error occurs on the line near the end of
confint.merMod() that labels the value: dimnames(citab) <-
list(names(bb[["t0"]]), pct) but appears to arise a few lines up,
where the expression that creates citab is hardwired to extract from
the structure created when boot.type="perc": citab <- t(sapply(bci,
function(x) x[["percent"]][4:5])) More details appear below. I
don't understand the structures enough to propose a fix other than
suggesting that the line above should extract in a way dependent on
the value of boot.type.
Package: lme4
Version: 1.1-6
platform x86_64-w64-mingw32
version.string R version 3.1.0 (2014-04-10)
Thanks for the report. This is fixed in the Github version (1.1-7)
now (if you or someone else needs this soon and can't do
library(devtools); install_github("lme4","lme4") , let me know
and I'll post new binaries at http://lme4.r-forge.r-project.org/repos .