I am facing a problem in lme4
package that seems very strange to me .
R
version 3.0.2 (2013-09-25) and lme4_1.1-7 behaves differently with R
version 3.2.1(2015-06-18) and lme4_1.1-8 . For example , in R
version 3.0.2 , if I ran the code confint.merMod(fit, oldName = FALSE, "sd_(Intercept)|group")
, it gives the following error :
Error in confint.merMod(fit, oldName = FALSE, c("sd_(Intercept)|group", : for method='profile', 'parm' must be specified as an integer -
But such error does not occur in R
version 3.2.1 and lme4_1.1-8 .
Again in lme4_1.1-7 , confint
command produces result , but with the same data confint
returns NA
in lme4_1.1-8 . Why ?
Is the result valid that I am getting from confint
command in lme4_1.1-7 ?
Any help is appreciated. Thanks.
To answer the less difficult part of your question (why do you get an error in 1.1-7 and not 1.1-8): specifying the parameter by name rather than integer should work in 1.1-8 but not in 1.1-7. This commit from June 13 shows when the feature was added to the package.
The following code works in the most recent development version of lme4
and should work in 1.1-8 (but not 1.1-7): we can specify the parameter to profile by number, by new name, by old name, or we can specify that we want to profile all of the random-effects parameters (there is only in one in this case):
library("lme4")
fm1 <- lmer(Reaction~Days+(1|Subject),sleepstudy)
p1 <- profile(fm1,parm=1)
p2 <- profile(fm1,parm="sd_(Intercept)|Subject",oldName=FALSE)
p3 <- profile(fm1,parm=".sig01",oldName=TRUE)
p4 <- profile(fm1,parm="theta_")
If you need to work with 1.1-7 the workaround should be simple: just specify the parameter by number.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.