Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Manually calculate GCorr

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 09-01-2016 03:49 AM
(1867 views)

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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.

3 REPLIES 3

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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!

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. **Registration is now open through August 30th**. Visit the SAS Hackathon homepage.

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.