<?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 using unique Patient ID in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/467951#M24335</link>
    <description>&lt;P&gt;but you don't have therapy in your model. Isn't that the most important thing? You seem to be interested in gender, but surely therapy is more likely to influence patient outcomes? It depends on why the study was designed, the objective and hypotheses etc. Personally, I'm not too familiar with glimmix, i used it many years ago when it was just a macro sas hadn't fully released. I would tend to use nlmixed. Glimmix v nlmixed is an interesting discussion tho : &lt;A href="http://www2.sas.com/proceedings/forum2007/179-2007.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2007/179-2007.pdf&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Jun 2018 03:43:05 GMT</pubDate>
    <dc:creator>pau13rown</dc:creator>
    <dc:date>2018-06-06T03:43:05Z</dc:date>
    <item>
      <title>Logistic Regression using unique Patient ID</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/467919#M24329</link>
      <description>&lt;P&gt;Hi, I am running a logistic regression model from an excel dataset, where each patient has multiple rows with information,&amp;nbsp;so the Patient, Cancer, and Gender column&amp;nbsp;are always the same, but the therapy column has different values. Like this example below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Patient&amp;nbsp; &amp;nbsp; &amp;nbsp;Cancer&amp;nbsp; Gender&amp;nbsp; &amp;nbsp; Therapy&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; F&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 234&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; F&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 234&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; F&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 555&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;N&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;M&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;444&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;N&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;M&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;777&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to run a logistic regression where it doesn't count the multiple&amp;nbsp;observations and only counts Patient 1 as 1 observation. It's been messing with my numbers and I'm not sure how to fix it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is how I usually code in proc logistic:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc logistic data=Data;&lt;BR /&gt;class&amp;nbsp;Gender&amp;nbsp;(ref="M") /param=ref;&lt;BR /&gt;model&amp;nbsp;Disease (ref="N")= gender;&lt;BR /&gt;Run;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 01:09:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/467919#M24329</guid>
      <dc:creator>kmardinian</dc:creator>
      <dc:date>2018-06-06T01:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression using unique Patient ID</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/467930#M24330</link>
      <description>&lt;P&gt;I've been looking up certain ways of doing this, and I found SAS pdf's that mentioned using Patient ID's as a repeated measure. Does anyone know how that would work with logistic regression?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 01:50:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/467930#M24330</guid>
      <dc:creator>kmardinian</dc:creator>
      <dc:date>2018-06-06T01:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression using unique Patient ID</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/467934#M24331</link>
      <description>&lt;P&gt;to answer your first question, it would be wasteful to discard data but if there's some reason for using the first obs for each patient you can reduce the data set using "proc sort data=data nodupkey; by patient; run;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you're right, however, with your second post, ie you likely want to use the repeated values for each patient. We would need to know more about the design of the study, eg the order the treatments were received, what exactly the outcome is etc. A cross over design is not uncommon and is maybe analogous. You can likely find SAS code examples online for a binary outcome. Note that you would not use proc logistic, in that case. Maybe you use proc nlmixed or genmod: &lt;A href="https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_intromix_a0000000216.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_intromix_a0000000216.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 02:36:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/467934#M24331</guid>
      <dc:creator>pau13rown</dc:creator>
      <dc:date>2018-06-06T02:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression using unique Patient ID</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/467935#M24332</link>
      <description>&lt;P&gt;Thank you so much for responding to my thread. I've been playing around with Proc Glimmix, and it seems to be working fine, do you think this would be a better way of doing it over Proc Genmod?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC GLIMMIX DATA=Data;&lt;BR /&gt;CLASS ID Gender (ref= "M");&lt;BR /&gt;MODEL&amp;nbsp;Disease (ref="N") =&amp;nbsp;Gender /DIST=binary oddsratio;&lt;BR /&gt;RANDOM INTERCEPT /SUBJECT=ID TYPE=UN;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 02:47:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/467935#M24332</guid>
      <dc:creator>kmardinian</dc:creator>
      <dc:date>2018-06-06T02:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression using unique Patient ID</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/467940#M24333</link>
      <description>&lt;P&gt;How many therapies do you have? I feel like transposing the data and using dummy variables/one hot encoding makes sense as well here since none of the other data changes across rows?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would become:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Patient Cancer Gender Therapy_234 Therapy_555 Therapy_444 Therapy_777&lt;/P&gt;
&lt;P&gt;1 Y F 1 1 0 0&lt;/P&gt;
&lt;P&gt;2 N M 0 0 1 1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This would also make sense if you have a baseline therapy you're comparing to.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 03:09:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/467940#M24333</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-06T03:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression using unique Patient ID</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/467950#M24334</link>
      <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for responding, I'm not sure how I would do that. I am still pretty new to SAS. But I have 200 unique patients!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 03:35:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/467950#M24334</guid>
      <dc:creator>kmardinian</dc:creator>
      <dc:date>2018-06-06T03:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression using unique Patient ID</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/467951#M24335</link>
      <description>&lt;P&gt;but you don't have therapy in your model. Isn't that the most important thing? You seem to be interested in gender, but surely therapy is more likely to influence patient outcomes? It depends on why the study was designed, the objective and hypotheses etc. Personally, I'm not too familiar with glimmix, i used it many years ago when it was just a macro sas hadn't fully released. I would tend to use nlmixed. Glimmix v nlmixed is an interesting discussion tho : &lt;A href="http://www2.sas.com/proceedings/forum2007/179-2007.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2007/179-2007.pdf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 03:43:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/467951#M24335</guid>
      <dc:creator>pau13rown</dc:creator>
      <dc:date>2018-06-06T03:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression using unique Patient ID</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/467956#M24336</link>
      <description>&lt;P&gt;The number of patients doesn't matter (edit: to the question I asked), the number of therapies do.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have the number of therapies?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use PROC TRANSPOSE to transpose your data and then create the 0/1's as necessary. The code is simple and we can help with that, but the methodology is more important first.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 04:18:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/467956#M24336</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-06T04:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression using unique Patient ID</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/467959#M24337</link>
      <description>&lt;P&gt;I have a total of 20 different therapies between 200 patients, thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 04:24:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/467959#M24337</guid>
      <dc:creator>kmardinian</dc:creator>
      <dc:date>2018-06-06T04:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression using unique Patient ID</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/467960#M24338</link>
      <description>&lt;P&gt;Ok, I don't think either way is going to matter, you have too many variables and too little observations - the general rule is 25-30 obs per variable. And since Therapy has 20 levels that'll be too complex. &amp;nbsp;Not sure if the NLMIXED is appropriate. I'm going to move this to the stats forum so some people smarter than me can answer it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 04:25:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/467960#M24338</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-06T04:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression using unique Patient ID</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/467961#M24339</link>
      <description>&lt;P&gt;Thank you Reeza, I appreciate all the help!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 04:29:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/467961#M24339</guid>
      <dc:creator>kmardinian</dc:creator>
      <dc:date>2018-06-06T04:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression using unique Patient ID</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/468026#M24341</link>
      <description>&lt;PRE&gt;
1) PROC GEE
2) PROC GLIMMIX


&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Jun 2018 12:32:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/468026#M24341</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-06-06T12:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression using unique Patient ID</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/468114#M24343</link>
      <description>Thank you so much for responding. Is there a reason I would use proc&lt;BR /&gt;glimmix instead of proc genmod?&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Jun 2018 16:04:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/468114#M24343</guid>
      <dc:creator>kmardinian</dc:creator>
      <dc:date>2018-06-06T16:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression using unique Patient ID</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/468260#M24349</link>
      <description>&lt;PRE&gt;
Good Question.
If you want more accuracy then pick PROC GLIMMIX,
If you want handle big data then pick PROC GEE .



&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Jun 2018 06:19:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-unique-Patient-ID/m-p/468260#M24349</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-06-07T06:19:56Z</dc:date>
    </item>
  </channel>
</rss>

