Programming the statistical procedures from SAS

COVARIANCE STRUCTURE PROC MIXED

Accepted Solution Solved
Reply
Contributor L_L
Contributor
Posts: 56
Accepted Solution

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
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).

View solution in original post


All Replies
Solution
‎11-22-2011 08:45 AM
Valued Guide
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: 58

Re: COVARIANCE STRUCTURE PROC MIXED

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

Valued Guide
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.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 276 views
  • 1 like
  • 3 in conversation