<?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: restricted cubic splines in SAS in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/restricted-cubic-splines-in-SAS/m-p/651954#M31307</link>
    <description>Please post it at Statistic Forum . &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt; &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;</description>
    <pubDate>Sat, 30 May 2020 10:49:25 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2020-05-30T10:49:25Z</dc:date>
    <item>
      <title>restricted cubic splines in SAS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/restricted-cubic-splines-in-SAS/m-p/651918#M31306</link>
      <description>&lt;P&gt;Thank you for this very helpful page!&lt;BR /&gt;I have used the EFFECT statement together with PROC LOGISTIC. But I haven't figured out how to modify the code in order to plot odds ratios on the y axis, instead of logit or predicted values. Is it possible to do that?&lt;/P&gt;&lt;P&gt;[example]&lt;/P&gt;&lt;P&gt;ods &lt;SPAN style="color: #0000ff;"&gt;select&lt;/SPAN&gt; ANOVA ParameterEstimates SplineKnots;&lt;BR /&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;proc logistic&lt;/SPAN&gt; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;data&lt;/SPAN&gt;=cars;&lt;BR /&gt;&amp;nbsp; effect spl = spline&lt;SPAN style="color: #66cc66;"&gt;(&lt;/SPAN&gt;weight / details naturalcubic basis=tpf&lt;SPAN style="color: #66cc66;"&gt;(&lt;/SPAN&gt;noint&lt;SPAN style="color: #66cc66;"&gt;)&lt;/SPAN&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;&amp;nbsp;&lt;BR /&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;&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; knotmethod=percentiles&lt;SPAN style="color: #66cc66;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #2e8b57; font-weight: bold;"&gt;5&lt;/SPAN&gt;&lt;SPAN style="color: #66cc66;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="color: #66cc66;"&gt;)&lt;/SPAN&gt;;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; model mpg_city = spl / selection=none;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;output&lt;/SPAN&gt; out=SplineOut predicted=Fit;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;quit&lt;/SPAN&gt;;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;proc sgplot&lt;/SPAN&gt; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;data&lt;/SPAN&gt;=SplineOut noautolegend;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; scatter &lt;SPAN style="color: #0000ff;"&gt;x&lt;/SPAN&gt;=weight y=mpg_city;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; series &lt;SPAN style="color: #0000ff;"&gt;x&lt;/SPAN&gt;=weight y=Fit / lineattrs=&lt;SPAN style="color: #66cc66;"&gt;(&lt;/SPAN&gt;thickness=&lt;SPAN style="color: #2e8b57; font-weight: bold;"&gt;3&lt;/SPAN&gt; color=red&lt;SPAN style="color: #66cc66;"&gt;)&lt;/SPAN&gt;;&lt;BR /&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;run&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;[sample figure]&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="example.jpg" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/40169i6B9992FD32942ACB/image-size/large?v=v2&amp;amp;px=999" role="button" title="example.jpg" alt="example.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 May 2020 03:32:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/restricted-cubic-splines-in-SAS/m-p/651918#M31306</guid>
      <dc:creator>jina1</dc:creator>
      <dc:date>2020-05-30T03:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: restricted cubic splines in SAS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/restricted-cubic-splines-in-SAS/m-p/651954#M31307</link>
      <description>Please post it at Statistic Forum . &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt; &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;</description>
      <pubDate>Sat, 30 May 2020 10:49:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/restricted-cubic-splines-in-SAS/m-p/651954#M31307</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-05-30T10:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: restricted cubic splines in SAS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/restricted-cubic-splines-in-SAS/m-p/651985#M31315</link>
      <description>&lt;P&gt;A plot of the odds ratios can be made using the ODDSRATIO statement as shown below. The plot is rotated compared to the example you show but conveys the same information. The following statements use the data in the example titled "Nonparametric Logistic Regression" in the PROC GAMPL documentation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=diabetesstudy;
  effect spl = spline(age / details naturalcubic basis=tpf(noint)                
                               knotmethod=percentiles(5) );
   model diabetes(event="1") = spl ;     
   oddsratio age / at(age=20 to 60 by 10);
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 May 2020 15:57:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/restricted-cubic-splines-in-SAS/m-p/651985#M31315</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2020-05-30T15:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: restricted cubic splines in SAS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/restricted-cubic-splines-in-SAS/m-p/652010#M31317</link>
      <description>&lt;P&gt;Here is a worked out example based on &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt; advice, including how to flip the graph&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=sashelp.heart;
where BP_status ne "Optimal";
  effect spl = spline(weight / details naturalcubic basis=tpf(noint)                
                               knotmethod=percentiles(5) );
   model BP_status(event="High") = spl / selection=none alpha=0.1;     
   units weight=10;
   oddsratio weight / at(weight=110 to 210 by 2) cl=pl;  
   ods output ORPlot=orp;
quit;

data orpGraph;
set orp;
Weight = input(scan(DisplayLabel, 2, "="), best.);
label weight="Weight (lbs)";
run;

proc sgplot data=orpGraph noautolegend;
band x=weight upper=upperCLdisplay lower=lowerCLdisplay;
series x=weight y=OddsRatioEstDisplay;
yaxis label="Odds Ratio of High BP for 10 lbs Weight Increase";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="example.png" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/40176i230EB09D415210C6/image-size/large?v=v2&amp;amp;px=999" role="button" title="example.png" alt="example.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 May 2020 20:09:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/restricted-cubic-splines-in-SAS/m-p/652010#M31317</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-05-30T20:09:30Z</dc:date>
    </item>
  </channel>
</rss>

