<?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 output LogFit from sliced restricted cubic spline (created through proc logistic)? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-output-LogFit-from-sliced-restricted-cubic-spline-created/m-p/714757#M220703</link>
    <description>&lt;P&gt;&lt;FONT color="#000000"&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;I was able to output a a restricted cubic spline (through effectplot statement in proc logistic) between my independent variable and binary outcome, sliced by a grouping variable. I would now like to change the axis and am trying to figure out how to save a "Logfit" output that also includes my additional grouping variable. I am then planning to recreate this graph in proc sgplot. I have noted the two main questions I have in&lt;/FONT&gt;&amp;nbsp;&lt;FONT color="#FF0000"&gt;red&lt;FONT color="#FF0000"&gt;&amp;nbsp;&lt;FONT color="#000000"&gt;below.&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;Thanks for your help!&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;proc logistic data=splines descending;
class ruca(ref="1_urbancore") / param=ref;
effect spl = spline(responsetime/ details naturalcubic 
basis=tpf(noint)knotmethod=percentiles(5));
model neurooutcome = ruca spl ruca*spl / expb cl outpred=Pred;
effectplot slicefit (x=responsetime sliceby=ruca) / noobs clm;
ods output &lt;FONT color="#FF0000"&gt;fitplot=Logfit&lt;/FONT&gt;; &lt;FONT color="#FF0000"&gt;(I was not able to output the LogFit with a group variable?)&lt;/FONT&gt;
run;

proc sgplot data=Logfit noautolegend; &lt;FONT color="#FF0000"&gt;(how to I add a statement to indicate the separate series for a group variable?)&lt;/FONT&gt;
        band upper=_uclm lower=_lclm x=_xcont1 / transparency=.3;
        series y=_predicted x=_xcont1;
        xaxis values=(0 to 1200 by 100) grid offsetmin=.05 offsetmax=.05;
        yaxis values=(0 to 0.2 by 0.05) grid offsetmin=.05 offsetmax=.05 
              label="Predicted Probability of Survival with CPC 1 or 2";
        title "Effect of RT";
        run;&lt;/PRE&gt;</description>
    <pubDate>Wed, 27 Jan 2021 19:38:25 GMT</pubDate>
    <dc:creator>njgrubic</dc:creator>
    <dc:date>2021-01-27T19:38:25Z</dc:date>
    <item>
      <title>How to output LogFit from sliced restricted cubic spline (created through proc logistic)?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-output-LogFit-from-sliced-restricted-cubic-spline-created/m-p/714757#M220703</link>
      <description>&lt;P&gt;&lt;FONT color="#000000"&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;I was able to output a a restricted cubic spline (through effectplot statement in proc logistic) between my independent variable and binary outcome, sliced by a grouping variable. I would now like to change the axis and am trying to figure out how to save a "Logfit" output that also includes my additional grouping variable. I am then planning to recreate this graph in proc sgplot. I have noted the two main questions I have in&lt;/FONT&gt;&amp;nbsp;&lt;FONT color="#FF0000"&gt;red&lt;FONT color="#FF0000"&gt;&amp;nbsp;&lt;FONT color="#000000"&gt;below.&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;Thanks for your help!&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;proc logistic data=splines descending;
class ruca(ref="1_urbancore") / param=ref;
effect spl = spline(responsetime/ details naturalcubic 
basis=tpf(noint)knotmethod=percentiles(5));
model neurooutcome = ruca spl ruca*spl / expb cl outpred=Pred;
effectplot slicefit (x=responsetime sliceby=ruca) / noobs clm;
ods output &lt;FONT color="#FF0000"&gt;fitplot=Logfit&lt;/FONT&gt;; &lt;FONT color="#FF0000"&gt;(I was not able to output the LogFit with a group variable?)&lt;/FONT&gt;
run;

proc sgplot data=Logfit noautolegend; &lt;FONT color="#FF0000"&gt;(how to I add a statement to indicate the separate series for a group variable?)&lt;/FONT&gt;
        band upper=_uclm lower=_lclm x=_xcont1 / transparency=.3;
        series y=_predicted x=_xcont1;
        xaxis values=(0 to 1200 by 100) grid offsetmin=.05 offsetmax=.05;
        yaxis values=(0 to 0.2 by 0.05) grid offsetmin=.05 offsetmax=.05 
              label="Predicted Probability of Survival with CPC 1 or 2";
        title "Effect of RT";
        run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Jan 2021 19:38:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-output-LogFit-from-sliced-restricted-cubic-spline-created/m-p/714757#M220703</guid>
      <dc:creator>njgrubic</dc:creator>
      <dc:date>2021-01-27T19:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to output LogFit from sliced restricted cubic spline (created through proc logistic)?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-output-LogFit-from-sliced-restricted-cubic-spline-created/m-p/715006#M220808</link>
      <description>&lt;P&gt;I suspect the problem is that you are using the wrong name for the object that you are trying to save. It is probably SliceFitPanel rather than FitPlot.&amp;nbsp; You can use ODS TRACE ON to find out:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods trace on;
proc logistic data= ...;
   ...
   ods output SliceFitPanel=LogFit;
run;
ods trace off;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;if you are unfamiliar with ODS TRACE, &lt;A href="https://blogs.sas.com/content/iml/2015/09/08/ods-table-names.html" target="_self"&gt;see this article about how to use the ODS OUTPUT statement.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 15:01:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-output-LogFit-from-sliced-restricted-cubic-spline-created/m-p/715006#M220808</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-01-28T15:01:17Z</dc:date>
    </item>
  </channel>
</rss>

