BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Maya1
Fluorite | Level 6

Hello,

 

I need some help with the G and GCorr matrix in generalized linear mixed models. I thought it was the covariance and the correlation matrix of the random effects. However, when I use proc corr to calculate the correlation between the estimated random effects given in the output table solutionR, I get different results from the output table GCorr? BTW, I have already taken into account the grouping variable.

 

Do you have any hint for me what went wrong?

Thanks in advance + regards,

M

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

This is a common misconception.  If you look at the doc that discusses mixed model theory, you will see that the random effects are generated by a matrix G. What you are seeing is an estimate of this matrix.

 

In general, correlation matrices that get printed as part of regression model are the correlation of the PARAMETERS (coefficients) in the model. In many cases, you can show that the sampling distribution of the parameter estimates is multivariate normal. These matrices estimate the parameters in the sampling distribution. The blog post "Simulate many samples from a logistic model" shows a similar situation for fixed effects in a logistic model.  It simulates many data sets and estimates the regression coefficients for each sample. It then displays a scatter plot of the estimates. You can see that the estimates are correlated.

View solution in original post

3 REPLIES 3
Rick_SAS
SAS Super FREQ

This is a common misconception.  If you look at the doc that discusses mixed model theory, you will see that the random effects are generated by a matrix G. What you are seeing is an estimate of this matrix.

 

In general, correlation matrices that get printed as part of regression model are the correlation of the PARAMETERS (coefficients) in the model. In many cases, you can show that the sampling distribution of the parameter estimates is multivariate normal. These matrices estimate the parameters in the sampling distribution. The blog post "Simulate many samples from a logistic model" shows a similar situation for fixed effects in a logistic model.  It simulates many data sets and estimates the regression coefficients for each sample. It then displays a scatter plot of the estimates. You can see that the estimates are correlated.

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

Also note: G is the covariance matrix of the (unknown) random effects in the model (gamma). G is not the covariance matrix of the estimated (really predicted) random effects in the model (gamma^). 

 

Adding to the complexity, as indicated by Rick, what you get from the output is G^, the estimated covariance matrix of the (unknown) random effects. G^ is not the estimated covariance matrix of the estimated (predicted) random effects.

Maya1
Fluorite | Level 6

Rick and Ivm, thank you for the helpful clarification!

But then, do I have any chance to get the (co)variance of the reference category of a random effect (3 unordered categories) that follows a multinomial distribution? If I don't choose the largest category as reference in my GLMM, the model does not converge. However if I do so, the G Matrix only contains the blocks of (co)variances for non-reference categories and of course, the (co)variance of the largest category is of main interest.

 

Thanks again!

 

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1740 views
  • 5 likes
  • 3 in conversation