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
- /
- GLIMMIX on clustered data with ordinal response

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

08-04-2015 02:16 PM

I have a data set that has people nested in cities and the dependent variable is ordinal.

The person variable is NQ and the city variable is CITY. There are about 4,000 people and 30 cities

There are both individual and city level effects.

I tried

proc glimmix data = DSNAME;

class nq city;

model DV = indlevelvar1 indlevelvar2 .... citylevelvar1 citylevelvar2 ....

/dist = mult link = clogit;

random intercept /subject = nq group = city;

run;

and got "model is too large to run in a reasonable time"

but I am not completely clear on whether I should use / subject = city or subject = nq or something else (both ran).

Peter

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

08-04-2015 03:55 PM

Peter,

I'll try to work from the bottom up here. What you have now would give a separate variance component due to nq for each city. Is that a reasonable approach? I think it would be if you have multiple observations on each individual. Here I am not so sure. I would be inclined to view nq as the "error", and city as an additional variance component. I would try:

proc glimmix data=DSNAME;

class nq city;

model DV(ref='<put something in here that makes sense>' = <fixed effects vector>/dist=mult link=clogit;

random intercept/subject=city;

run;

If you have lots of data relative to the number of variables being fit, I would consider using METHOD=LAPLACE as well, thus giving a conditional response, and putting you in the position of being able to compare models on their IC values. But with only about 130 people per city, and assuming the DV has 4 levels, you have about 33 records to estimate each level. Could run into stability and quasi-separation problems.

Steve Denham

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

08-04-2015 04:14 PM

Thanks Steve,

Helpful as always. That ran. One thing that worries me is that the df is the same for the city level effects and the person level effects. Is that correct? I know estimating the df in these models is tricky and full of options

Peter

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

08-05-2015 07:24 AM

Peter,

I know you are expecting a df around 30 (minus fixed effects estimated) for the city level df, so I think the key here is ddfm=bw (between-within) even though this isn't necessarily a repeated measures design. I think the default is ddfm=contain, but since you have observations at the nq level, that is may be why it ends up using the residual df for everything. One way to check would be to estimate the BLUPs for each city by adding the solution option to the RANDOM statement and looking at both specifications.

Steve Denham

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

08-05-2015 07:45 PM

Thanks again!