Obsidian | Level 7

## Interpreting the Estimated G Matrix in Proc Mixed

I have run this code in Proc Mixed for repeated measurements on subjects=Flask:

`proc mixed data=FRF method=reml cl ic covtest;class CCI4 CHCI3  Time Flask ;model Leakage=CCI4  Time CCI4*Time ;random CHCI3  CCI4*CHCI3 CHCI3*Time CCI4*CHCI3*Time /s;repeated   / subject=Flask(CCI4*CHCI3)  type=arh(1) r;lsmeans CCI4 / pdiff cl adjust=tukey;run;`

And part of the output shows the G Matrix below. How do we interpret the ARH(1) subject  effect Flask(CCI4*CHCHI3) and its  Estimate 0.9730?

1 ACCEPTED SOLUTION

Accepted Solutions
SAS Super FREQ

## Re: Interpreting the Estimated G Matrix in Proc Mixed

What you are asking for might not be applicable for a complex covariance model like yours.

Jill

9 REPLIES 9
Obsidian | Level 7

## Re: Interpreting the Estimated G Matrix in Proc Mixed

I think I figured it out. Does it mean "Based on the off-diagonals, we estimate a covariance of 0.9730 between two measurements on the same Flask, regardless of time lapsed?"
SAS Super FREQ

## Re: Interpreting the Estimated G Matrix in Proc Mixed

0.9730 in the Covariance Parameter Estimates table is not an element in the G matrix. It is a parameter in the R matrix. It is the correlation in the residuals between two adjacent observations. See the documentation below for more information on the ARH(1) structure. The estimated value for rho is 0.9730.

https://go.documentation.sas.com/doc/en/pgmsascdc/v_023/statug/statug_mixed_syntax14.htm#statug.mixe...

Also, your G matrix is not positive definite. You might want to take out some of the random effects in your RANDOM statement.

Hope this helps,

Jill

Obsidian | Level 7

## Re: Interpreting the Estimated G Matrix in Proc Mixed

@jiltao Thank you for the material. You are very correct. Does the non-positive definite matrix impact negatively on the covariance parameters estimated by the model, or it is just a warning that something in not right? I relised that the more I include some random parameters the more i get problems with convergence as well.

SAS Super FREQ

## Re: Interpreting the Estimated G Matrix in Proc Mixed

G matrix not positive definite might not be devastating, but it is always a good idea to take care of this so you have a clean convergence. If you take out the random effects that have 0 estimated variance, this message is likely going away. The estimates for other effects might remain the same.

## Re: Interpreting the Estimated G Matrix in Proc Mixed

Hi @jiltao  - removing the random effects when there is a non-positive G matrix seems to me to be a problem for randomized complete block designs, where the block estimate is zero.  Removal shifts the denominator degrees of freedom from containment to residual, so the analysis no longer reflects the blocking in the design.  Is the answer then to use a ddf= option to set the denominator degrees of freedom to what would be expected for the design?

SteveDenham

SAS Super FREQ

## Re: Interpreting the Estimated G Matrix in Proc Mixed

Actually, as far as I know, there is no consensus on what to do when the G matrix is not positive definite. While some advice removing the "offending" random effects, others argue the modeling of the random effects is dictated by the design (like a RCB design), and therefore should not change the model effect specifications. If there is only one random effect with 0 estimated variance, one approach is to re-specify that random effect with the statement -- repeated / subject=<random_effect> type=cs;

If the default ddf value becomes inappropriate when a random effect is removed, then you might use ddf= option to specify your own denominator degrees of freedom value, or use other estimation method such as ddfm=kr if that helps.

Jill

Obsidian | Level 7

## Re: Interpreting the Estimated G Matrix in Proc Mixed

@jiltao @SteveDenham Thank you for the insights, I am following. However, based on the posted G and R matrices, I have further questions:

1. How do I calculate the percentage contribution of each estimated variance component?

2. How do we get the overall error variance when heterogeneous error variance for each subject is displayed?

SAS Super FREQ

## Re: Interpreting the Estimated G Matrix in Proc Mixed

What you are asking for might not be applicable for a complex covariance model like yours.

Jill

Obsidian | Level 7

## Re: Interpreting the Estimated G Matrix in Proc Mixed

Hi Colleagues. I got a question from someone who saw my SAS Proc Mixed code that I used to fit a linear mixed model in SAS Studio (SAS on Demand). They asked me: "In what software environment is the procedure implemented?" I am confused with this environment term. How do I answer that one?
Discussion stats
• 9 replies
• 1572 views
• 2 likes
• 3 in conversation