<?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: Code for Logistic Regression in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Code-for-Logistic-Regression/m-p/528364#M144199</link>
    <description>SET is telling SAS what your input data set is, so what's your input data set.</description>
    <pubDate>Fri, 18 Jan 2019 16:25:28 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-01-18T16:25:28Z</dc:date>
    <item>
      <title>Code for Logistic Regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Code-for-Logistic-Regression/m-p/528222#M144127</link>
      <description>&lt;P&gt;&amp;nbsp;&amp;nbsp; Hello everyone,&lt;/P&gt;&lt;P&gt;Can anyone suggest me a code for logistic regression&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question: &lt;SPAN style="color: black;"&gt;Perform a logistic regression with covariates age/sex/race on the outcome of having at least 1 visit to a Primary Care Provider. (PCP = Primary Care Provider)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID &amp;nbsp;&amp;nbsp; PCP SEX RACE AGE&lt;/P&gt;&lt;P&gt;&amp;nbsp;1 &amp;nbsp; 8&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;71&lt;BR /&gt;&amp;nbsp; 2&amp;nbsp; 8&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;65&lt;BR /&gt;&amp;nbsp;3&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp; &amp;nbsp;2&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;81&lt;BR /&gt;&amp;nbsp;4&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;75&lt;BR /&gt;&amp;nbsp;5&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp; &amp;nbsp;2&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;83&lt;BR /&gt;&amp;nbsp;6&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp; &amp;nbsp;2&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;79&lt;BR /&gt;&amp;nbsp;7&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;66&lt;BR /&gt;&amp;nbsp;8&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp; &amp;nbsp;2&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;71&lt;BR /&gt;&amp;nbsp;9 &amp;nbsp; 8&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;86&lt;BR /&gt;&amp;nbsp;10 &amp;nbsp; 8&amp;nbsp;&amp;nbsp; &amp;nbsp;2&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;70&lt;BR /&gt;&amp;nbsp; 11&amp;nbsp; 8&amp;nbsp;&amp;nbsp; &amp;nbsp;2&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;76&lt;BR /&gt;&amp;nbsp; 12&amp;nbsp; 8&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;75&lt;BR /&gt;&amp;nbsp;13 &amp;nbsp; 8&amp;nbsp;&amp;nbsp; &amp;nbsp;2&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;66&lt;BR /&gt;&amp;nbsp; 14&amp;nbsp; 8&amp;nbsp;&amp;nbsp; &amp;nbsp;2&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;91&lt;BR /&gt;&amp;nbsp;15 &amp;nbsp; 8&amp;nbsp;&amp;nbsp; &amp;nbsp;2&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;67&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Any help will be appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jan 2019 01:06:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Code-for-Logistic-Regression/m-p/528222#M144127</guid>
      <dc:creator>prjadhav00</dc:creator>
      <dc:date>2019-01-18T01:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Code for Logistic Regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Code-for-Logistic-Regression/m-p/528259#M144154</link>
      <description>&lt;P&gt;The first thing you need to do is to get your data in a form that suits the question. If you want to model the outcome&amp;nbsp;&lt;SPAN&gt;of having at least 1 visit to a Primary Care Provider, then PCP should be a binary variable, created like below. The example code for the logistic regression can then easily be found in the &lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_logistic_examples02.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_self"&gt;Examples Section of the PROC LOGISTIC Documentation&lt;/A&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ID PCP SEX RACE AGE;
datalines;
1 8 1 1 71
2 8 1 1 65
3 8 2 1 81
4 8 1 1 75
5 8 2 1 83
6 8 2 1 79
7 8 1 1 66
8 8 2 1 71
9 8 1 1 86
10 8 2 1 70
11 8 2 1 76
12 8 1 1 75
13 8 2 1 66
14 8 2 1 91
15 8 2 1 67
;

data RegData;
   set have;
   PCP=(PCP&amp;gt;0);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Jan 2019 07:46:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Code-for-Logistic-Regression/m-p/528259#M144154</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-01-18T07:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: Code for Logistic Regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Code-for-Logistic-Regression/m-p/528306#M144173</link>
      <description>&lt;P&gt;If I am understanding your problem properly, this data doesn't seem to match the problem description, nor does the addition by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31304"&gt;@PeterClemmensen&lt;/a&gt;. You would be doing a logistic regression where the responses are 1 for every observation, which doesn't work in logistic regression. You would need some zeros in the Y variable to fit a logistic regression.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jan 2019 14:22:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Code-for-Logistic-Regression/m-p/528306#M144173</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-01-18T14:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: Code for Logistic Regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Code-for-Logistic-Regression/m-p/528315#M144177</link>
      <description>Thanks for the suggestion</description>
      <pubDate>Fri, 18 Jan 2019 14:40:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Code-for-Logistic-Regression/m-p/528315#M144177</guid>
      <dc:creator>prjadhav00</dc:creator>
      <dc:date>2019-01-18T14:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Code for Logistic Regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Code-for-Logistic-Regression/m-p/528347#M144191</link>
      <description>&lt;P&gt;Could you tell me what I am supposed to put&amp;nbsp; in place of 'have'.&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt; RegData&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
   &lt;SPAN class="token keyword"&gt;set&lt;/SPAN&gt; have..........NOT CLEAR&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
   PCP&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;PCP&lt;SPAN class="token operator"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;0&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jan 2019 15:37:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Code-for-Logistic-Regression/m-p/528347#M144191</guid>
      <dc:creator>prjadhav00</dc:creator>
      <dc:date>2019-01-18T15:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: Code for Logistic Regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Code-for-Logistic-Regression/m-p/528364#M144199</link>
      <description>SET is telling SAS what your input data set is, so what's your input data set.</description>
      <pubDate>Fri, 18 Jan 2019 16:25:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Code-for-Logistic-Regression/m-p/528364#M144199</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-18T16:25:28Z</dc:date>
    </item>
  </channel>
</rss>

