<?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: Coding for restricted cubic splines for multivariable logistic regression in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Coding-for-restricted-cubic-splines-for-multivariable-logistic/m-p/258812#M28579</link>
    <description>&lt;P&gt;Thanks for your suggestions&lt;/P&gt;</description>
    <pubDate>Thu, 24 Mar 2016 14:15:40 GMT</pubDate>
    <dc:creator>anuli98</dc:creator>
    <dc:date>2016-03-24T14:15:40Z</dc:date>
    <item>
      <title>Coding for restricted cubic splines for multivariable logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Coding-for-restricted-cubic-splines-for-multivariable-logistic/m-p/258573#M28575</link>
      <description>&lt;P&gt;My analysis is determining the association between weight (continuous variable) and post-operative complications (yes/no). I am doing a multivariable logistic regression analysis, adjusting for seven predictors (1 has multiple categories, 5 are yes/no, and 1 is continuous). I notice that the association between weight and complication is not exactly linear, so it is recommended that I do restricted cubic splines. I was using the following code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;logistic&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=weight.avg_pred_val_all_data2;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#ff0000" face="Courier New" size="2"&gt;&lt;FONT color="#ff0000" face="Courier New" size="2"&gt;&lt;FONT color="#ff0000" face="Courier New" size="2"&gt;effect&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; spl_weight = spline(weight/naturalcubic knotmethod=percentiles(&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;5&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;));&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/*natural cubic splines with knots at quartiles*/&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;model&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; est_prob= spl_weight/ &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;cl&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT color="#0000ff"&gt;output out&lt;/FONT&gt;=predicted_values &lt;FONT color="#0000ff"&gt;pred&lt;/FONT&gt;=pred;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&lt;FONT size="2"&gt;Where&amp;nbsp;est_prob is the&amp;nbsp;probability&amp;nbsp;of any complication.I then plotted the &lt;STRONG&gt;unadjusted&lt;/STRONG&gt; spline association between weight and probability of any complication:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in 0in 0pt;"&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;ods&lt;/SPAN&gt; &lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;graphics&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;height&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;6.5&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;in&lt;/SPAN&gt; &lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;width&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;10&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;in&lt;/SPAN&gt; &lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;imagename&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="background: white; color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;"Figure2_revised_with_cubicspline"&lt;/SPAN&gt; &lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;border&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;off&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in 0in 0pt;"&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;proc&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN style="background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;sgplot&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=predicted_values &lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;noautolegend&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in 0in 0pt;"&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;xaxis&lt;/SPAN&gt; &lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;label&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="background: white; color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;'Weight (kg)'&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in 0in 0pt;"&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;yaxis&lt;/SPAN&gt; &lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;label&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="background: white; color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;'Any complication'&lt;/SPAN&gt; &lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;values&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; to &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;60&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; by &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;5&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in 0in 0pt;"&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;series&lt;/SPAN&gt; &lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;x&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=weight &lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;y&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=pred/ &lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;lineattrs&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=(&lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;color&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=gray &lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;pattern&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=solid &lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;thickness&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;2&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in 0in 0pt;"&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;run&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Arial" size="2"&gt;My question is, how do I show the association between weight and any complication, adjusted for my seven predictors? &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2016 16:13:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Coding-for-restricted-cubic-splines-for-multivariable-logistic/m-p/258573#M28575</guid>
      <dc:creator>anuli98</dc:creator>
      <dc:date>2016-03-23T16:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: Coding for restricted cubic splines for multivariable logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Coding-for-restricted-cubic-splines-for-multivariable-logistic/m-p/258716#M28576</link>
      <description>&lt;P&gt;If your full model doesn't involve interactions, have a look at proc gam.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 03:16:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Coding-for-restricted-cubic-splines-for-multivariable-logistic/m-p/258716#M28576</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-03-24T03:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Coding for restricted cubic splines for multivariable logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Coding-for-restricted-cubic-splines-for-multivariable-logistic/m-p/258724#M28577</link>
      <description>Better post it at Stat Forum , since it is a Statistical Problem.

proc logistic has already built-in Graphics to display it .Check EFFECTPLOT statement :

&lt;A href="http://blogs.sas.com/content/iml/2016/03/21/statistical-analysis-stephen-curry-shooting.html" target="_blank"&gt;http://blogs.sas.com/content/iml/2016/03/21/statistical-analysis-stephen-curry-shooting.html&lt;/A&gt;</description>
      <pubDate>Thu, 24 Mar 2016 05:23:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Coding-for-restricted-cubic-splines-for-multivariable-logistic/m-p/258724#M28577</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-03-24T05:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: Coding for restricted cubic splines for multivariable logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Coding-for-restricted-cubic-splines-for-multivariable-logistic/m-p/258811#M28578</link>
      <description>&lt;P&gt;Thanks I will try that&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 14:15:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Coding-for-restricted-cubic-splines-for-multivariable-logistic/m-p/258811#M28578</guid>
      <dc:creator>anuli98</dc:creator>
      <dc:date>2016-03-24T14:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Coding for restricted cubic splines for multivariable logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Coding-for-restricted-cubic-splines-for-multivariable-logistic/m-p/258812#M28579</link>
      <description>&lt;P&gt;Thanks for your suggestions&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 14:15:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Coding-for-restricted-cubic-splines-for-multivariable-logistic/m-p/258812#M28579</guid>
      <dc:creator>anuli98</dc:creator>
      <dc:date>2016-03-24T14:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: Coding for restricted cubic splines for multivariable logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Coding-for-restricted-cubic-splines-for-multivariable-logistic/m-p/581488#M28580</link>
      <description>Hi, Is there way to output the estimate estimate from the effectplot? For example, the outcome at weight = x.</description>
      <pubDate>Thu, 15 Aug 2019 16:06:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Coding-for-restricted-cubic-splines-for-multivariable-logistic/m-p/581488#M28580</guid>
      <dc:creator>sasbee</dc:creator>
      <dc:date>2019-08-15T16:06:35Z</dc:date>
    </item>
  </channel>
</rss>

