[R-sig-ME] parallel option of the bootMer function: warnings for parallel=no, but not for parallel=snow
Spronken, M. (Maitta)
m.spronken at psych.ru.nl
Tue Oct 21 15:45:30 CEST 2014
Dear all,
I have a question about the parallel option of the bootMer function, I hope you can help me with this. I am using R 3.0.1.
I ran a mixed model with the lmer function of the package lme4_1.1-7 and tried to obtain confidence intervals with the bootMer function (in order to get the same results each time, I used set.seed(80)).
In order to divide the bootstrapping calculations over several cores, I used the parallel option of the bootMer function: 'parallel=snow, ncpus=7'. However, I also bootstrapped the model using 'parallel=no', in order to see whether it led to the same results.
The bootstrapping results were the same for 'parallel=snow' and 'parallel=no'. However, when using 'parallel=no', I got the following warnings:
1: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model failed to converge: degenerate Hessian with 1 negative eigenvalues
2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model failed to converge: degenerate Hessian with 1 negative eigenvalues
When using 'parallel=snow', these warnings did not occur. Maybe also important, I do not get these warnings when running the original model.
This is a problem I have encountered with several models. Does someone know why using 'parallel=snow' does not lead to convergence warnings, while using 'parallel=no' does? Are these warnings problematic? Below you find the code I used.
Thanks in advance for your help!
Code:
model_1 <- lmer(DV_continuous ~ factor_threelevels + (1 + factor_threelevels|userId), data=combined_data, control = lmerControl(optCtrl = list(maxfun = 1000000)))
FUN_bootMer <- function(fit) {
return(fixef(fit))
}
set.seed(80)
boot_model_1a <- bootMer(model_1, FUN_bootMer, nsim = 1000, type = "parametric", parallel = "snow", ncpus =7)
set.seed(80)
boot_model_1b <- bootMer(model_1, FUN_bootMer, nsim = 1000, type = "parametric", parallel = "no")
More information about the R-sig-mixed-models
mailing list