<?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 to write logistic regression equation using proc logistic in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/How-to-write-logistic-regression-equation-using-proc-logistic/m-p/781580#M10289</link>
    <description>&lt;P&gt;Hi, this is data I have.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;dependent var: outcome (1=cured 2=not cured)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;independent var : treatment (1=A, 2=B, 3=C)&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;diagnosis (1=contaminated, 2= uncontaminated)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This is code for logistic regression&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;proc logistic data=test;&lt;BR /&gt;class outcome treatment diagnosis/ param=reference;&lt;BR /&gt;model outcome= treatment diagnosis;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;and I got this (ref variable treatment 3 and diagnosis 2)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="htst1003_1-1637531252907.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65985iA0597E78D6E7CCF3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="htst1003_1-1637531252907.png" alt="htst1003_1-1637531252907.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If I have to write model, is this correct? I dont have to include reference variable in the full equation?&lt;/P&gt;&lt;P&gt;logit(cured)=1.42 +0.58(Treatment1)+1.56(Treatment2) - 0.96(diagnosis 1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I find full model? Am I doing the right thing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 21 Nov 2021 21:52:06 GMT</pubDate>
    <dc:creator>htst1003</dc:creator>
    <dc:date>2021-11-21T21:52:06Z</dc:date>
    <item>
      <title>How to write logistic regression equation using proc logistic</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-write-logistic-regression-equation-using-proc-logistic/m-p/781580#M10289</link>
      <description>&lt;P&gt;Hi, this is data I have.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;dependent var: outcome (1=cured 2=not cured)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;independent var : treatment (1=A, 2=B, 3=C)&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;diagnosis (1=contaminated, 2= uncontaminated)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This is code for logistic regression&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;proc logistic data=test;&lt;BR /&gt;class outcome treatment diagnosis/ param=reference;&lt;BR /&gt;model outcome= treatment diagnosis;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;and I got this (ref variable treatment 3 and diagnosis 2)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="htst1003_1-1637531252907.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65985iA0597E78D6E7CCF3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="htst1003_1-1637531252907.png" alt="htst1003_1-1637531252907.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If I have to write model, is this correct? I dont have to include reference variable in the full equation?&lt;/P&gt;&lt;P&gt;logit(cured)=1.42 +0.58(Treatment1)+1.56(Treatment2) - 0.96(diagnosis 1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I find full model? Am I doing the right thing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Nov 2021 21:52:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-write-logistic-regression-equation-using-proc-logistic/m-p/781580#M10289</guid>
      <dc:creator>htst1003</dc:creator>
      <dc:date>2021-11-21T21:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to write logistic regression equation using proc logistic</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-write-logistic-regression-equation-using-proc-logistic/m-p/781594#M10290</link>
      <description>&lt;P&gt;Except for the fact that you have rounded the regression coefficients to two decimal places (which I would &lt;EM&gt;not&lt;/EM&gt; do), it appears that your equation is correct.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the "full model". SAS parameterizes models with class variables to have the last value alphabetically set to zero, that's why you don't see a treatment 3, because the coefficient is set to zero. You can request other parameterizations, but you still get the same fitted model and the same predictions.&lt;/P&gt;</description>
      <pubDate>Sun, 21 Nov 2021 23:09:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-write-logistic-regression-equation-using-proc-logistic/m-p/781594#M10290</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-11-21T23:09:09Z</dc:date>
    </item>
  </channel>
</rss>

