<?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 Re: Logistic regression -accounting for clustering/repeated values in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-accounting-for-clustering-repeated-values/m-p/825113#M40865</link>
    <description>&lt;P&gt;You can use the REPEATED statement in PROC GEE to fit the logistic model accounting for the correlation within neighborhood clusters. For example,&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc gee;
class census_tract sex;
model drug_a(event="1") = age sex arthritis prop_below_poverty prob_with_highschool / dist=bin;
repeated subject=census_tract / type=exch;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 24 Jul 2022 02:24:50 GMT</pubDate>
    <dc:creator>StatDave</dc:creator>
    <dc:date>2022-07-24T02:24:50Z</dc:date>
    <item>
      <title>Logistic regression -accounting for clustering/repeated values</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-accounting-for-clustering-repeated-values/m-p/825110#M40863</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset with a binary outcome (The prescription of drug A Yes/No). My dataset is at patient level, meaning there are unique patients in the dataset. We wanted to consider how neighborhoods could affect the use of drug A, so we merged our data by census tracts to neighborhood-level factors (proportion in the census tract living below the poverty level, proportion with a high school degree). The dataset is now set up such that patients in the same census tracts have the same neighborhood level values (see dataset below).&amp;nbsp; I want to run a logistic regression to predict the use of drug A, but I would like to account for the repeated values as a result of the census tract. How do I do this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt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&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Drug A = dependent variable /outcome. (Was determined at patient level)&lt;/P&gt;&lt;P&gt;Diabetes ( 0 = no diabetes, 1 = has diabetes)&lt;/P&gt;&lt;P&gt;arthritis (0 = no arthritis, 1 has arthritis)&lt;/P&gt;&lt;P&gt;prop_below_poverty&amp;nbsp; and&amp;nbsp;prop_with_highschool (continuous variables calculated as percentages)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jul 2022 22:14:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-accounting-for-clustering-repeated-values/m-p/825110#M40863</guid>
      <dc:creator>derbygun</dc:creator>
      <dc:date>2022-07-23T22:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic regression -accounting for clustering/repeated values</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-accounting-for-clustering-repeated-values/m-p/825111#M40864</link>
      <description>&lt;PRE&gt;&lt;CODE class=""&gt;proc logistic data =  A descending;
Class  diabetes  (ref = '0')/ param = ref; 
Class  arthritis (ref = '0')/ param = ref; 
class sex (ref = '0')/ param = ref; 
model DrugA (EVENT = '1') =  age sex diabetes arthritis prop_below_poverty prop_with_highschool;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The above SAS codes show the simple logistic regression I did without accounting for the repeated values of "&lt;CODE class=""&gt;prop_below_poverty"&amp;nbsp;and&amp;nbsp;"prop_with_highschool"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jul 2022 22:45:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-accounting-for-clustering-repeated-values/m-p/825111#M40864</guid>
      <dc:creator>derbygun</dc:creator>
      <dc:date>2022-07-23T22:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic regression -accounting for clustering/repeated values</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-accounting-for-clustering-repeated-values/m-p/825113#M40865</link>
      <description>&lt;P&gt;You can use the REPEATED statement in PROC GEE to fit the logistic model accounting for the correlation within neighborhood clusters. For example,&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc gee;
class census_tract sex;
model drug_a(event="1") = age sex arthritis prop_below_poverty prob_with_highschool / dist=bin;
repeated subject=census_tract / type=exch;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 24 Jul 2022 02:24:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-accounting-for-clustering-repeated-values/m-p/825113#M40865</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2022-07-24T02:24:50Z</dc:date>
    </item>
  </channel>
</rss>

