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
- /
- How do I adjust for clustered data in logistic reg...

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

05-16-2017 10:24 AM

I am using proc logistic to investigate the association between the variables laek and pv (indexar, alder, arv, and koen are confounders). The model looks something like this:

proc logistic data=dataset;

class indexar (ref='2010') koen (ref='K') / param = ref ;

model laek(EVENT='1') = pv indexar alder arv koen;

run;

The individual level dataset that I am using is obtained from patients who are grouped within different clinics. I believe that the clinic effect is a mediator rather than a confunder. How can I adjust for clustering? Should I use a "sandwich" estimator and in that case, how do I do that in SAS?

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

05-17-2017 09:37 AM

Try Generalize Linear Mixed Model.

Check PROC GLIMMIX .

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

05-17-2017 02:04 PM

Depending on the exact type of inference you are interested in, you can account for such clustering in a number of ways. The two simplest ways are probably in GENMOD or GLIMMIX (though, depending on the details of the analysis you can also use PROC SURVEYLOGISTIC or even PROC PHREG, or reparameterize your data to use a conditional maximum likelihood approach in PROC LOGISTIC. But these are less intuitive and more complicated approaches, I think).

For example, you can fit a generalized estimating equation (GEE):

PROC GENMOD data=dataset;

class indexar (ref='2010') koen (ref='K') / param = ref ;

model laek(EVENT='1') = pv indexar alder arv koen;

repeated subject=patient_id/ type=un;

run;

You can fit just fit a normal logistic model but with the empirical ("sandwich") variance estimators:

PROC GLIMMIX data=dataset empirical;

class indexvar koen;

model laek(event='1') = pv indexar alder arv koen;

run;

You can fit a mixed effects model:

PROC GLIMMIX data=dataset;

class indexvar koen;

model laek(event='1') = pv indexar alder arv koen;

random intercept / subject=patient_id;

run;

For both the RANDOM statement in GLIMMIX and the REPEATED statement in GENMOD, you can also specify a hierarchical (nested) structure (e.g. "random intercept / subject=patient_id(clinic_id)" for patients nested within clinics), though I would consult this note (http://support.sas.com/kb/24/200.html) and/or this document (https://support.sas.com/resources/papers/proceedings14/SAS026-2014.pdf) to make sure you understand exactly what it is you are specifying and how to interpret it.

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

05-19-2017 06:58 AM

Thank you so much. This has been very helpful!