turn on suggestions

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
- /
- Random Syntax in Mixed Models

Topic Options

- 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

06-14-2011 04:42 PM

Let's say I'm working on a model for human height. There's two groups, one eating a control diet and another eating a supplemented diet. The heights of the individuals are tracked as they age (longitudinal). I use proc mixed with something like

height = age diet;

random personID;

Is this significantly from

height = age diet;

random intercept age diet /sub=personID;

Also can anyone give me insight as to when it would be better to model this as repeated measurements or as random sampling from a population?

height = age diet;

random personID;

Is this significantly from

height = age diet;

random intercept age diet /sub=personID;

Also can anyone give me insight as to when it would be better to model this as repeated measurements or as random sampling from a population?

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

06-14-2011 06:21 PM

I'm not sure what the question is. The model which specifies

random personID;

fits a model with a random intercept term, whereas the model which specifies

random intercept age diet / sub=personID;

fits a model in which each person has their own age slope and their own diet slope. Are you wondering if the model with person-specific age and diet slope effects produces a model which has better fit to the data, then you could use a likelihood ratio test.

Note that this second model would only seem to be valid if each person was observed on multiple diets. If each person receives only a single diet, then there would be no data that would allow you to compute a person-specific diet slope effect. Also, if each person receives only a single diet, then the subject effect should be nested within diet.

random personID;

fits a model with a random intercept term, whereas the model which specifies

random intercept age diet / sub=personID;

fits a model in which each person has their own age slope and their own diet slope. Are you wondering if the model with person-specific age and diet slope effects produces a model which has better fit to the data, then you could use a likelihood ratio test.

Note that this second model would only seem to be valid if each person was observed on multiple diets. If each person receives only a single diet, then there would be no data that would allow you to compute a person-specific diet slope effect. Also, if each person receives only a single diet, then the subject effect should be nested within diet.

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

06-15-2011 11:38 AM

Aahh, not thinking straight,

I meant to ask is

random personID the same as

random intercept sub=personID;

Thanks Dale

I meant to ask is

random personID the same as

random intercept sub=personID;

Thanks Dale

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

06-15-2011 02:41 PM

Syntax with

random personID;

or

random intercept / sub=personID;

should produce the same log-likelihood and identical random effect variance estimates. I would note that while the results should be identical, the two models are parameterized differently. Because the models are parameterized differently, round-off errors could conceivably produce different results for the alternate syntaxes. If you were to observe any difference in results, such differences should be quite small.

The second form in which you use a subject specification is generally more efficient in use of computer resources. I typically recommend use of the "random intercept / sub=personID;" form.

random personID;

or

random intercept / sub=personID;

should produce the same log-likelihood and identical random effect variance estimates. I would note that while the results should be identical, the two models are parameterized differently. Because the models are parameterized differently, round-off errors could conceivably produce different results for the alternate syntaxes. If you were to observe any difference in results, such differences should be quite small.

The second form in which you use a subject specification is generally more efficient in use of computer resources. I typically recommend use of the "random intercept / sub=personID;" form.

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

06-16-2011 03:10 PM

Thanks Dale!