'LME4-GLMER - PROBLEMS WITH ALLFIT. Mismatch between summary(allFit(model)) and summary(model)

I'm writing to ask a question about the allFit function of the lme4 package.

I have raised a GLMM, with the following structure:

MM <-glmer(y~ x1 + x2 + x3+x4 + (1 | subject)+(0+x1+x2|school), data=data, family =poisson(), offset=log(n))

I can't offer the original data, but suppose:

  • x1,x2,x3, x4 are the auxiliary variables.
  • y: response variable
  • subject: represents each row of the data frame
  • school: represents groups of rows of the data frame.
  • n: sample size

Therefore, I have a GLMM model, with a random intercept and two random slopes that are also correlated with each other, but without correlation with the intercept. When I perform simulations, on some occasions, convergence warnings are given. I have made a review of all available documentation and related questions. Specifically, looking at the latest lme4 documentation (page 16), to further investigate these warnings, I used the allFit function . The results show me that no optimizer, or only occasionally the L-BFGS-B, gives problems, and that all the parameter estimates, both for the fixed and random effects, are practically the same. However, I don't understand why, when these models have convergence warnings, the results I get by doing the variance-covariance matrix and the summary on the model are completely different from those returned by the summary function on the object resulting from applying allFit.

beta <- fixef(MM) differs noticeably from summary(allFit(MM))$fixef

var <-as.data.frame(VarCorr(MM))$sdcor differs noticeably from summary(allFit(MM))$sdcor

Being the values ​​returned by summary(allFit) consistent with those deduced from the sample.

I have verified that when the model shows no convergence problems, the results of fixef(MM) and VarCorr(MM) exactly match those returned by summary(allFit(MM)).

I have performed the test in the latest available update '1.1.29' and in '1.1.28', and the same thing happens to me in both.

I'm sorry I can't provide the dataset, and I apologize in advance if this has already been asked, because I've searched a lot but didn't find this bug.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source