## proc mixed: specifying covariance parameters

Frequent Contributor
Posts: 75

# proc mixed: specifying covariance parameters

hello all:

suppose I am fitting a random intercept and slope and slope^2 model

so my G matrix would be a 3x3 matrix. What I want to do is set some of the covariances to zero and run the model again with this updated G matrix. So for example say I run the procedure and find that the covariance between slope and slope^2 is not significant, how can i tell proc mixed to set that covariance to zero (or any other covariance in general) and then rerun the model with the updated matrix?

i tried using the parms option but i couldnt figure it out

thanks
geo
Regular Contributor
Posts: 171

## Re: proc mixed: specifying covariance parameters

You have to specify the HOLD= option on the PARMS statement. I assume that you have specified an unstructured covariance matrix for the intercept, slope, and slope^2 and that the terms in your random model are named in that order. I also assume that conditional on the random effects, the residuals are IID (that you do not have a REPEATED statement modifying the residual variance structure).

If the above is correct, then the covariance of slope and slope^2 random effects will be the 6-th and last random effects covariance parameter in the table of covariance parameters, and that there is one parameter (residual variance) that appears in the table after the random effect covariance estimates. For covariance estimates , , ..., , (where explicit values should be assumed for each of these terms), you could write your MIXED code as:

proc mixed data=mydata;
class subjectID ...;
model response = ...;
random intercept slope slope2 / subject=subjectID type=un;
parms () () () () () (0) () /
hold=6;
run;
Frequent Contributor
Posts: 75

## Re: proc mixed: specifying covariance parameters

Dale-

is there a way to not have to explicitly state the values of of the other 6 parameters? In other words just tell the mixed procedure to set the 6th parameter to 0 and then go ahead and find optimal values for the other 6 variance parameters?
Discussion stats
• 2 replies
• 145 views
• 0 likes
• 2 in conversation