<?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: spline for odd ratios after logistic regression in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/spline-for-odd-ratios-after-logistic-regression/m-p/891288#M352111</link>
    <description>Better post it at Statistic Forum:&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/Statistical-Procedures/bd-p/statistical_procedures" target="_blank"&gt;https://communities.sas.com/t5/Statistical-Procedures/bd-p/statistical_procedures&lt;/A&gt;&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt; maybe could give you a hand.</description>
    <pubDate>Mon, 28 Aug 2023 11:35:46 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2023-08-28T11:35:46Z</dc:date>
    <item>
      <title>spline for odd ratios after logistic regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/spline-for-odd-ratios-after-logistic-regression/m-p/891277#M352107</link>
      <description>&lt;P&gt;Hi, everyone&lt;/P&gt;
&lt;P&gt;I spent a lot of time yesterday searching how to make spline for odd ratios after a logistic regression. My idea is simple the coefficient of a continuous variable is derived from the logistic regression, and I can use it and its CI to construct the spline for ORs.&lt;/P&gt;
&lt;P&gt;But I did not find any direct SAS procedures or statements to do so. Would you guide me the direction? Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 05:20:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/spline-for-odd-ratios-after-logistic-regression/m-p/891277#M352107</guid>
      <dc:creator>TomHsiung</dc:creator>
      <dc:date>2023-08-28T05:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: spline for odd ratios after logistic regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/spline-for-odd-ratios-after-logistic-regression/m-p/891288#M352111</link>
      <description>Better post it at Statistic Forum:&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/Statistical-Procedures/bd-p/statistical_procedures" target="_blank"&gt;https://communities.sas.com/t5/Statistical-Procedures/bd-p/statistical_procedures&lt;/A&gt;&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt; maybe could give you a hand.</description>
      <pubDate>Mon, 28 Aug 2023 11:35:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/spline-for-odd-ratios-after-logistic-regression/m-p/891288#M352111</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-08-28T11:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: spline for odd ratios after logistic regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/spline-for-odd-ratios-after-logistic-regression/m-p/891412#M352156</link>
      <description>&lt;P&gt;What you are trying to do is not entirely clear, but &lt;A href="http://support.sas.com/kb/70221" target="_self"&gt;this note&lt;/A&gt; might address it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 01:45:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/spline-for-odd-ratios-after-logistic-regression/m-p/891412#M352156</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2023-08-29T01:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: spline for odd ratios after logistic regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/spline-for-odd-ratios-after-logistic-regression/m-p/891895#M352308</link>
      <description>&lt;P&gt;Hello, Dave.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Wow! That's a great reference. Thanks. I copied and edited the code to suit my project. But, so far, I have never get the Odd Ratio plot as shown in the first example. My code only generated one column for the variable of serumAlb. I am just not able to make it. Your investigation would be of great important. Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro Logistic2;
proc logistic data= &amp;amp;raw_data_name plots = oddsratio(type=vertical);
class &amp;amp;class_var;
        effect SplALB=spline(serumAlb/naturalcubic);
        model &amp;amp;censor(event = '1') = &amp;amp;indep_list;
        effectplot fit(x=serumAlb);
        effectplot fit(x=serumAlb) / link;
        oddsratio serumAlb / at(serumAlb=34.8125 36.0425 37.35 39.0 40.92);
        store kmod;
        run;
%mend;
%Logistic2&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-08-31 at 6.40.14 PM.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/87360i75DEC9570F2E1824/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-08-31 at 6.40.14 PM.png" alt="Screenshot 2023-08-31 at 6.40.14 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 10:41:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/spline-for-odd-ratios-after-logistic-regression/m-p/891895#M352308</guid>
      <dc:creator>TomHsiung</dc:creator>
      <dc:date>2023-08-31T10:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: spline for odd ratios after logistic regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/spline-for-odd-ratios-after-logistic-regression/m-p/891906#M352313</link>
      <description>&lt;P&gt;You got to work incrementally and get something basic to work before tailoring it to your cause. Try copying the syntax in the note exactly except for your variable and dataset. Will it work? If so, you can make little incremental changes, all the time saving the previous working codes for possible step back. For example, the values in the note had “to” syntax. Also, do not use macro language at early development stage. Everything should be unoriginal, clear and transparent.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 11:42:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/spline-for-odd-ratios-after-logistic-regression/m-p/891906#M352313</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2023-08-31T11:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: spline for odd ratios after logistic regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/spline-for-odd-ratios-after-logistic-regression/m-p/891939#M352330</link>
      <description>The most likely reason is that you specified serumALB in your MODEL statement as a predictor rather than the spline effect, splALB.  Effectively, the spline was not even used in the model.</description>
      <pubDate>Thu, 31 Aug 2023 14:12:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/spline-for-odd-ratios-after-logistic-regression/m-p/891939#M352330</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2023-08-31T14:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: spline for odd ratios after logistic regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/spline-for-odd-ratios-after-logistic-regression/m-p/891951#M352333</link>
      <description>Exactly! This is the issue. I specified serumALB instead of SplALB in the MODEL statement. After correcting this error, everything followed as expected. Thank you.</description>
      <pubDate>Thu, 31 Aug 2023 14:44:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/spline-for-odd-ratios-after-logistic-regression/m-p/891951#M352333</guid>
      <dc:creator>TomHsiung</dc:creator>
      <dc:date>2023-08-31T14:44:26Z</dc:date>
    </item>
  </channel>
</rss>

