Solved
Contributor
Posts: 56

# COVARIANCE STRUCTURE PROC MIXED

Dear all

I'm using proc mixed for repeated mesaures with the code below:

Proc mixed data=ds_input;

class id m_time;

model y=x1 x2 x3 /solution;

repeated m_time / type=un   subject=id;

run;

Could anyone explain me the difference between the sintax type=un and type=un(1)? What's the meaning of  Banded Covariance structure?

When is it recommend to use a banded covariance structure? and an autoregressive covariance structure?

Thanks in advance for any help

Accepted Solutions
Solution
‎11-22-2011 08:45 AM
Valued Guide
Posts: 684

## COVARIANCE STRUCTURE PROC MIXED

Big difference. With UN(1), there is a separate variance for each level of time (assuming your repeated measure is time), and 0 covariance (correlation) between times. With UN, there is a separate variance for each, and separate covariances for each pair of times. UN is the most general structure, but it can be difficult to fit (there can be many variance-covariance parameters to estimate). With a repeated measure, I would expect some correlation between times; thus, UN(1) is usually not realistic. AR(1) should also be tried. There are many possible structures that are simpler than UN, but still account for correlations. I recommend you read the repeated measures chapter in the book SAS for Mixed Models, 2nd Edition, by R. Littell et al. (SAS Press).

All Replies
Solution
‎11-22-2011 08:45 AM
Valued Guide
Posts: 684

## COVARIANCE STRUCTURE PROC MIXED

Big difference. With UN(1), there is a separate variance for each level of time (assuming your repeated measure is time), and 0 covariance (correlation) between times. With UN, there is a separate variance for each, and separate covariances for each pair of times. UN is the most general structure, but it can be difficult to fit (there can be many variance-covariance parameters to estimate). With a repeated measure, I would expect some correlation between times; thus, UN(1) is usually not realistic. AR(1) should also be tried. There are many possible structures that are simpler than UN, but still account for correlations. I recommend you read the repeated measures chapter in the book SAS for Mixed Models, 2nd Edition, by R. Littell et al. (SAS Press).

Contributor
Posts: 66

## Re: COVARIANCE STRUCTURE PROC MIXED

Dear lvm, what is the difference between UN(1) and CSH then ? Thank you.

Valued Guide
Posts: 684

## Re: COVARIANCE STRUCTURE PROC MIXED

Big difference. With UN(1), all the covariances (and thus correlations) within subjects are 0. The variances are all different (potentially) for each group. With CSH, there is also a separate variance for each group, but there are nonzero covariances for the pairs of times. With CSH, there is a single correlation for all possible pairs, but because the variances can be different, the covariances will also be different. The User's Guide for MIXED has a nice table showing the covariance matrix for many of the different structures.

🔒 This topic is solved and locked.