<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How do I adjust for clustered data in logistic regression? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-adjust-for-clustered-data-in-logistic-regression/m-p/359048#M18855</link>
    <description>&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc logistic data=dataset;&lt;BR /&gt;class indexar (ref='2010') koen (ref='K') / param = ref ;&lt;BR /&gt;model laek(EVENT='1') = pv indexar alder &amp;nbsp;arv koen;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The individual level dataset that I am using is&amp;nbsp;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?&lt;/P&gt;</description>
    <pubDate>Tue, 16 May 2017 14:24:52 GMT</pubDate>
    <dc:creator>Siz</dc:creator>
    <dc:date>2017-05-16T14:24:52Z</dc:date>
    <item>
      <title>How do I adjust for clustered data in logistic regression?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-adjust-for-clustered-data-in-logistic-regression/m-p/359048#M18855</link>
      <description>&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc logistic data=dataset;&lt;BR /&gt;class indexar (ref='2010') koen (ref='K') / param = ref ;&lt;BR /&gt;model laek(EVENT='1') = pv indexar alder &amp;nbsp;arv koen;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The individual level dataset that I am using is&amp;nbsp;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?&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 14:24:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-adjust-for-clustered-data-in-logistic-regression/m-p/359048#M18855</guid>
      <dc:creator>Siz</dc:creator>
      <dc:date>2017-05-16T14:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do I adjust for clustered data in logistic regression?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-adjust-for-clustered-data-in-logistic-regression/m-p/359368#M18865</link>
      <description>&lt;P&gt;Try Generalize Linear Mixed Model.&lt;/P&gt;
&lt;P&gt;Check PROC GLIMMIX .&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 13:37:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-adjust-for-clustered-data-in-logistic-regression/m-p/359368#M18865</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-05-17T13:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: How do I adjust for clustered data in logistic regression?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-adjust-for-clustered-data-in-logistic-regression/m-p/359443#M18872</link>
      <description>&lt;P&gt;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).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, you can fit a generalized estimating equation (GEE):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC GENMOD data=dataset;&lt;BR /&gt;class indexar (ref='2010') koen (ref='K') / param = ref ;&lt;BR /&gt;model laek(EVENT='1') = pv indexar alder &amp;nbsp;arv koen;&lt;/P&gt;
&lt;P&gt;repeated subject=patient_id/ type=un;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can fit just fit a normal logistic model but with the empirical ("sandwich")&amp;nbsp;variance estimators:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC GLIMMIX data=dataset empirical;&lt;/P&gt;
&lt;P&gt;class indexvar koen;&lt;/P&gt;
&lt;P&gt;model laek(event='1') = pv indexar alder arv koen;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can fit a mixed effects model:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC GLIMMIX data=dataset;&lt;/P&gt;
&lt;P&gt;class indexvar koen;&lt;/P&gt;
&lt;P&gt;model laek(event='1') = pv indexar alder arv koen;&lt;/P&gt;
&lt;P&gt;random intercept / subject=patient_id;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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 (&lt;A href="http://support.sas.com/kb/24/200.html" target="_blank"&gt;http://support.sas.com/kb/24/200.html&lt;/A&gt;) and/or this document (&lt;A href="https://support.sas.com/resources/papers/proceedings14/SAS026-2014.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings14/SAS026-2014.pdf&lt;/A&gt;) to make sure you understand exactly what it is you are specifying and how to interpret it.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 18:04:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-adjust-for-clustered-data-in-logistic-regression/m-p/359443#M18872</guid>
      <dc:creator>RyanSimmons</dc:creator>
      <dc:date>2017-05-17T18:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do I adjust for clustered data in logistic regression?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-adjust-for-clustered-data-in-logistic-regression/m-p/359938#M18893</link>
      <description>&lt;P&gt;Thank you so much. This has been very helpful!&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 10:58:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-adjust-for-clustered-data-in-logistic-regression/m-p/359938#M18893</guid>
      <dc:creator>Siz</dc:creator>
      <dc:date>2017-05-19T10:58:09Z</dc:date>
    </item>
  </channel>
</rss>

