<?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: Why are the transformations for restricted cubic splines the same regardless of the outcome? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Why-are-the-transformations-for-restricted-cubic-splines-the/m-p/533042#M26855</link>
    <description>&lt;P&gt;Thanks for the clarification Rick! For RCS, I suppose the transformation mainly depends on the number of knots and the knot locations.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Feb 2019 19:45:00 GMT</pubDate>
    <dc:creator>pkfamily</dc:creator>
    <dc:date>2019-02-05T19:45:00Z</dc:date>
    <item>
      <title>Why are the transformations for restricted cubic splines the same regardless of the outcome?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Why-are-the-transformations-for-restricted-cubic-splines-the/m-p/532813#M26850</link>
      <description>&lt;P&gt;I'm using the spline function from the effect statement in PROC Logistic and noticed that the RCS transformations for my independent variable happen to be the same regardless of what outcome I use. This confused me as I thought the transformations were performed in relation to the outcome.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To illustrate my issue, I have fitted Death Status or BP Status against Weight as the independent variable. The data set used is the heart data set from sashelp.&amp;nbsp; I'm running SAS9.4 M4.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc print and Proc Corr results below showing how the spline transformations are exactly the same. Proc freq results also below to show that the outcomes fitted are different.&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="for_sas_board2.png" style="width: 242px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26858i24F8C179816C0C58/image-size/large?v=v2&amp;amp;px=999" role="button" title="for_sas_board2.png" alt="for_sas_board2.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="for_sas_board1.png" style="width: 298px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26860i574278054F5315ED/image-size/large?v=v2&amp;amp;px=999" role="button" title="for_sas_board1.png" alt="for_sas_board1.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="for_sas_board3.png" style="width: 384px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26859i385B307D4752F3A9/image-size/large?v=v2&amp;amp;px=999" role="button" title="for_sas_board3.png" alt="for_sas_board3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data heart_anal;set sashelp.heart;&lt;BR /&gt;where BP_Status ne '' and weight ne . and status ne '';run;

proc logistic data=heart_anal noprint outdesign=cubic_out1;
effect spl=spline(Weight /basis=tpf(noint) naturalcubic knotmethod=rangefractions(0.10 0.50 0.90));
model Status= spl/expb;
run;
data cubic_out1;set cubic_out1;id=_n_;keep id spl1 spl2;run;

proc logistic data=heart_anal noprint outdesign=cubic_out2;
effect spl=spline(Weight /basis=tpf(noint) naturalcubic knotmethod=rangefractions(0.10 0.50 0.90));
model BP_Status= spl/expb;
run;
data cubic_out2;set cubic_out2;id=_n_;keep id spl1 spl2;rename spl1=spl1_2 spl2=spl2_2;run;

data comb;merge cubic_out1 cubic_out2;by id;run;

proc corr data=comb;var spl1 spl1_2 spl2 spl2_2;run;
proc print data=comb(obs=5);id id;var spl1 spl1_2 spl2 spl2_2;run; 
proc freq data=heart_anal;table status*bp_status;run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks for reading. Any help will be greatly appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 23:47:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Why-are-the-transformations-for-restricted-cubic-splines-the/m-p/532813#M26850</guid>
      <dc:creator>pkfamily</dc:creator>
      <dc:date>2019-02-04T23:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: Why are the transformations for restricted cubic splines the same regardless of the outcome?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Why-are-the-transformations-for-restricted-cubic-splines-the/m-p/533016#M26853</link>
      <description>&lt;P&gt;No, your assumption is not correct. Only the X variable is used to generate the spline effects. Notice that the EFFECT statement only refers to the WEIGHT variable in your example.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is &lt;A href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_introcom_sect020.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;the documentation for the spline effects&lt;/A&gt;, in case you want to read more details.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Feb 2019 17:13:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Why-are-the-transformations-for-restricted-cubic-splines-the/m-p/533016#M26853</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-02-05T17:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Why are the transformations for restricted cubic splines the same regardless of the outcome?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Why-are-the-transformations-for-restricted-cubic-splines-the/m-p/533042#M26855</link>
      <description>&lt;P&gt;Thanks for the clarification Rick! For RCS, I suppose the transformation mainly depends on the number of knots and the knot locations.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Feb 2019 19:45:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Why-are-the-transformations-for-restricted-cubic-splines-the/m-p/533042#M26855</guid>
      <dc:creator>pkfamily</dc:creator>
      <dc:date>2019-02-05T19:45:00Z</dc:date>
    </item>
  </channel>
</rss>

