[R-sig-ME] glmmTMB: variance-covariance matrix parameterization

Ben Bolker bbolker at gmail.com
Mon Aug 15 02:11:46 CEST 2016


Starting at

https://github.com/glmmTMB/glmmTMB/blob/master/glmmTMB/src/glmmTMB.cpp#L151

for an nxn variance-covariance matrix, we have the first n parameters
as the logarithms of the standard deviation.  The remaining parameters
fill in the lower triangle (in column-major order) of the Cholesky
factor of the correlation matrix: information on this is at

http://kaskr.github.io/adcomp/classUNSTRUCTURED__CORR__t.html

So, for a 2x2 unstructured variance-covariance matrix, the first two
parameters are the log-sd, the third parameter is the correlation.

 I'm adding this to the documentation for ?VarCorr ...




On Sun, Aug 14, 2016 at 5:50 PM, Sophia Kyriakou
<sophia.kyriakou17 at gmail.com> wrote:
> Hi all,
>
> Does anyone know what is the parameterization that glmmTMB uses for the
> variance-covariance matrix in the case of generelized linear mixed models?
>
> I can tell that when fitting a generalized linear mixed model with a random
> intercept, where the random effects are normally distributed with zero mean
> and variance sigma^2, glmmTMB estimates theta = log(sigma) and then returns
> sigma^2.
>
> But what is the parameterization for example in the 2 x 2 random-slopes
> case?
> Let the 2 x 2 variance-covariance matrix have elements ( sigma^2_{1},
> sigma_{12}, sigma_{12}, sigma^2_{2} ).
> glmmTMB returns three theta parameters (theta_1, theta_2, theta_3), where
> theta_1 = log(sigma_1)
> theta_2 = log(sigma_2)
> but I don't know what the relationship between theta_3 and sigma_{12} (or
> the correlation rho) is.
>
> I know that I can extract thetas using fitTMB$sdr$par.fixed and sigmas
> using matrix(unlist(VarCorr(fitTMB)),2,2), where fitTMB is the model fitted
> via glmmTMB, but I would like to understand the parameterization used.
>
> Thank you in advance.
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models



More information about the R-sig-mixed-models mailing list