3

I'm running a generalized linear mixed models (GLMM) and am comparing the Laplace approximation to the Gauss-Hermite Quadrature. I have three predictor variables (fixed effects) and each is a number between $0$ and $1$. My response variable is either $0$ or $1$.

The Laplace approximation gives me a very large variance for my random effect (individual animal) with the following:

  • Variance of $1822$
  • SD of $42.69$
  • Number of obs: $231$
  • Groups: $195$

I have three fixed effects - the estimates for the Laplace model are numbers like, $-6.6, 3.9, -1.1$. For the GHQ model, it gives a random effect variance of $38.02$ $+/- 6.2$, and the fixed effect estimates are numbers like, $-9.6, 0.44, -2.77$.

Another important point is that, for both the Laplace and GHQ, for some models, the models fail to converge. I currently used the following code:

cntrl <- glmerControl(optimizer = "bobyqa", tol = 1e-4, optCtrl=list(maxfun=100000))

Is it 'bad' to have such a large variance for the individual random effect, as in the Laplace model? Does the fact that my predictor variable is a small number (bounded between $0-1$) make it even 'worse' to get a large result like this?

burphound
  • 117
  • 1
    It means that the within subject correlation is strong. – Michael M Sep 16 '23 at 08:03
  • 1
    It would be helpful to provide your original model code, as this would really contextualize what may be causing the issue. – Shawn Hemelstrand Sep 16 '23 at 10:41
  • 1
    "Bad" in what sense? You're just comparing estimators. So if the true variance is large (assuming that the model holds), you want a large estimator, if the true variance is small, you want a small estimator, and if you don't know the truth, you can't tell. Large discrepancies between these (taking into account standard errors/confidence intervals) in any case are a reason to worry. – Christian Hennig Sep 16 '23 at 10:57
  • 3
    I'd suspect that 195 groups and 231 observations will make it hard to tell apart the random effects variance from the error variance. – Christian Hennig Sep 16 '23 at 10:58
  • 1
    You don't say how many G-H quadrature points you're using. As a first pass, you should try to increase the number of quadrature points until the estimates stabilize (comparing with GLMMadaptive as suggested in an answer is also a good idea) – Ben Bolker Sep 20 '23 at 23:54

2 Answers2

6

The Laplace approximation works better when a normal distribution can reasonably approximate the integrand; for more info, see also here. For binary data, this is not the case; hence, this may be the cause of the problems.

You could also try the adaptive Gauss-Hermite implementation in the GLMMadaptive package.

Dimitris Rizopoulos
  • 21,024
  • 2
  • 20
  • 47
5

Mixed effects models in the frequentist domain always involve approximations as your post makes clear you are well aware of. Bayesian mixed effects models are trivial to implement and make no approximations. So it is a good idea to run a Bayesian model to get a posterior median or mean random effects variance and uncertainty interval for the variance. Compare this with the approximate frequentist method. You can fit Bayesian random effects models quite easily with the R brms and rstanarm packages.

I recently fitted an ordinal model with the ordinal package that had two observations per cluster and about 100 clusters, and the approximations completely broke down to yield meaningless standard errors for all the variables in the model. A Bayesian model worked fine, and so did a GEE approach.

High random effects variances can also result from misspecified models. As discussed here the compound symmetric correlation structure assumed by random intercept models is not reasonable in some settings. Also random effects can misbehave if you have strongly varying error variance or non-normality.

Frank Harrell
  • 91,879
  • 6
  • 178
  • 397