[R-sig-ME] calculation of standard errors for fixed effects in glmer
Ben Bolker
bbolker at gmail.com
Fri Aug 16 16:53:30 CEST 2013
Hans Tissot <hans.tissot at ...> writes:
>
> Dear list,
>
> I had a basic question about how standard errors are calculated for fixed
> effects when using the Laplace approximation in glmer. I am looking at the
> implementation details vignette:
> http://cran.r-project.org/web/packages/lme4/vignettes/Implementation.pdf for
> lme4. If I look at equation 40, the log likelihood depends on beta - the
> fixed effects coefficients and theta - the covariance parameters for random
> effects. Since Laplace method is doing approximate ML, one could use the
> standard ML recipe and compute the negative Hessian of loglik(beta,theta |
> y) w.r.t beta and theta, invert this and then extract the portion relevant
> to the fixed effects to get the covariance of estimates betaHat. My
> questions are:
>
> 1. Does glmer compute a joint Hessian for (beta,theta) as described above?
No.
>
> 2. Another approach could be to regard thetaHat to be equal to the true
> theta and use the Hessian w.r.t beta only for computing covariance of
> betaHat. Does glmer follow this approach?
No, but this is the closest answer. The estimated variance-covariance
for beta is indeed conditional on the estimated theta values. Typically
we use a derivative-free optimizer to fit (theta) or (theta,beta), so we
don't actually have the Hessian available. However, the equivalent of
the Hessian is available via taking the internal "RX" slot (which can
be extracted via getME(fitted,"RX"), inverting it (it's a triangular
matrix, so that is easy), and taking its cross-product; that's where
the beta variance-covariance matrix comes from.
> 3. Are the required derivatives for doing Hessian calculations computed
> numerically or is there an easy to understand expression for GLMMs that
> reduces to the expression for LMMs?
They're never explicitly needed.
> 4. Are any of these calculations fundamentally different when using
> Gauss-Hermite quadrature instead of the Laplace method?
No.
> Sorry if these questions are very basic, but I am new to mixed effects
> models and am not very familiar with the literature.
>
> Thanks in advance,
>
> Hans Tissot
They seem to be perfectly reasonable questions.
Ben Bolker
More information about the R-sig-mixed-models
mailing list