4
$\begingroup$

I was looking here for a R package to make an estimate on a general linear mixed effects model (Poisson family) with two random effects and (adaptive) Gaussian quadrature. I also need the full matrix of variance-covariance of the fixed and random estimates.

@Daniel advices me to use the mixed_model() function from the GLMMadaptive package.

I tried the mixed_model() function but the estimations I get are really different from the glmer() function.

Any feedback on this package? Or would you have other R packages to advise me in my situation?

$\endgroup$

1 Answer 1

2
$\begingroup$

Possible reasons why you get different results from the two packages include

  • The default of glmer() is the Laplace approximation and not the adaptive Gaussian quadrature. You could try refitting with glmer() and increase the nAGQ argument.
  • The optimization procedure in one of the two packages was not completely successful. You could try fitting the model with both functions by changing the defaults or providing better starting values.

In general generalized linear mixed models are more challenging models to fit, resulting in the observation you made. Therefore, it is advisable to study how each package works and suitably tweak the defaults.

$\endgroup$
3
  • 2
    $\begingroup$ +1 for the insight and good advice. Your last observation suggests a useful diagnostic: using just one of the software platforms, evaluate the goodness of fit (perhaps as the log likelihood) of both solutions. If the difference is inconsequential, you're dealing with a challenging problem having multiple near-optimal solutions (which happens with mixture models); if the difference is large, then almost surely the two models differ and it's time to explore the documentation more fully. $\endgroup$
    – whuber
    Commented Jan 3, 2020 at 15:08
  • 1
    $\begingroup$ I thought AQ was only available in glmer() for one random effect ? $\endgroup$ Commented Jan 3, 2020 at 15:53
  • $\begingroup$ @RobertLong it is available but it is not the default. The default is nAGQ = 1, which is the Laplace approximation. $\endgroup$ Commented Jan 3, 2020 at 18:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.