cancel
Showing results for 
Search instead for 
Did you mean: 

prox mixed Example 79.5 Random Coefficients

SOLVED
er7212
Fluorite | Level 6
Solved!

prox mixed Example 79.5 Random Coefficients

Message contains a hyperlink

Hello all

 

I am new to PROC MIXED and having a trouble understanding SAS Doc Example (Example 79.5 Random Coefficients) as referenced here. So in the first part of the example, we fit the following random intercept/slope model to the RC data with 'Batch' as the grouping (clustering) element:

 

proc mixed data=rc;
   class Batch;
   model Y = Month / s;
   random Int Month / type=un sub=Batch s;
run;

 

And based on Output 79.5.3, we have 2 columns per each subject which translates to 6 random effects that are related to each other with a full unstructured format. This means that the G matrix is 6 by 6 and all of 36 elements are parameters to be estimated. But later on, when I look at Output 79.5.5, I can only find 4 of those estimates. So the question is what happened to other G parameter estimates and how I can retrieve those?

 

Appreciate any words of wisdom anyone could share.

 

 

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ
Solution

Re: prox mixed Example 79.5 Random Coefficients

Output 79.5.8 shows the estimated slope and intercept for each of the three subjects. The G matrix is 2x2. Since G is symmetric, that implies 3 parameters for the unstructured covariance matrix. Reread the paragraph that begins "The two random effects are Int and Month," which includes the sentence, "In mixed model notation, G is block diagonal with unstructured 2x2 blocks. "

View solution in original post

4 REPLIES 4
Rick_SAS
SAS Super FREQ
Solution

Re: prox mixed Example 79.5 Random Coefficients

Output 79.5.8 shows the estimated slope and intercept for each of the three subjects. The G matrix is 2x2. Since G is symmetric, that implies 3 parameters for the unstructured covariance matrix. Reread the paragraph that begins "The two random effects are Int and Month," which includes the sentence, "In mixed model notation, G is block diagonal with unstructured 2x2 blocks. "

er7212
Fluorite | Level 6

Re: prox mixed Example 79.5 Random Coefficients

Thanks much, it indeed helps out.
er7212
Fluorite | Level 6

Re: prox mixed Example 79.5 Random Coefficients

Message contains a hyperlink Message contains an image

Is there any way to extract the full G matrix when we specify SUBJECT= option?

 

In reading the document as referenced here, it mentions "If you specify the SUBJECT= option, then the block of the matrix corresponding to the first subject is displayed".

 

However I'd like to see the full G matrix for all blocks (even though if they might be identical which in this example because of TYPE=UN, I think that's not the case). A use case I am following is to fully reproduce "Solution for Random Effects" estimates (gamma hat) as defined by

 

image.png

Thanks again

Rick_SAS
SAS Super FREQ

Re: prox mixed Example 79.5 Random Coefficients

Message contains a hyperlink

The "full matrix" is block-diagonal. You can use the BLOCK function in SAS/IML (a matrix language) to construct block-diagonal matrices. An example is shown in the article "Constructing block matrices with applications to mixed models."

 

You can also use the MMEQ and MMEQSOL options to get the matrix expression for the mixed model equations. (Not sure if this last solution is relevant to your case.)