Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- how to correctly fit a repeated measure model

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-18-2013 04:13 PM

Hello:

I want to fit a repeated measure model using proc mixed but got confused by the appropriate way of writing down the model. Using the sample dataset pr in the SAS document

SAS/STAT(R) 9.2 User's Guide, Second Edition

The sample code in the above link proposes to use repeated statement directly

proc mixed data=pr method=ml covtest;

class Person Gender;

model y = Gender Age Gender*Age / s;

repeated / type=un subject=Person r;

run;

which assumes measures within each subjects are correlated. However, I have seen in many places that people use random effects to fit a repeated measure model. In this case, something like

proc mixed data=pr method=ml covtest;

class Person Gender;

model y = Gender Age Gender*Age / s;

random person / v;

run;

The within subject correlation is modelled by introducing a random effect for each subject over different time point. The two model yields different results and I am not sure which one is correct. The data itself looks like a typical repeated measure without any special structure. If both models are valid (I bet they are), what are the assumptions in those two models and how can I decide which one to use if I am given a new dataset?

Thanks,

Peter

Accepted Solutions

Solution

11-19-2013
10:24 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-19-2013 10:24 AM

Your first model assumes that measures within a person, at each time point, are related as expressed by the unstructured covariance matrix. This R side formulation is the more standard approach, expecially for things like growth models (as the example given). The G side model that you present ignores the correlation between time points, and calculates a variance component due to person. This is sometimes referred to as a random intercept model.

You should look at SAS for Mixed Models, 2nd ed. by Littell et al, and at Generalized Linear Mixed Models by Stroup for some really good insights into model selection.

Steve Denham

All Replies

Solution

11-19-2013
10:24 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-19-2013 10:24 AM

Your first model assumes that measures within a person, at each time point, are related as expressed by the unstructured covariance matrix. This R side formulation is the more standard approach, expecially for things like growth models (as the example given). The G side model that you present ignores the correlation between time points, and calculates a variance component due to person. This is sometimes referred to as a random intercept model.

You should look at SAS for Mixed Models, 2nd ed. by Littell et al, and at Generalized Linear Mixed Models by Stroup for some really good insights into model selection.

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-21-2013 01:45 PM

Thanks Steve. I assume the first model is more general and would allow more general correlation structure whereas the second model enforces a positive within subject correlation.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-22-2013 10:49 AM

I would call the second model more general, as it imposes no structure on the observations, assuming that they are randomly distributed, and that only the subject (person in this case) contributes variation above the residual variance. The R side model (second model) enforces some sort of structure/correlation on the observations within a subject.

Steve Denham