<?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: Adding spline effect in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Adding-spline-effect/m-p/899578#M83018</link>
    <description>&lt;P&gt;I think the &lt;A href="https://communities.sas.com/t5/forums/replypage/board-id/sas_procedures/message-id/83017" target="_self"&gt;documentation for SURVEYREG&lt;/A&gt; is clear, you need the SOLUTION option to the MODEL statement in order to get the parameterestimates output to a data set.&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="PaigeMiller_0-1698008594880.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/89005iD29E10855D79C115/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PaigeMiller_0-1698008594880.png" alt="PaigeMiller_0-1698008594880.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure why you are not getting the SPLINEKNOTS output as well. If you run your PROC SURVEYREG, does the spline knots get written to the output? If so, try this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods trace on;
proc surveyreg;
    /* Other surveyreg commands go here */
run;
ods trace off;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The name of the tables are written to the log, one of them should be the SPLINEKNOTS table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don't say why you want this information in output data sets. This is a common failing here in the forums, some people don't tell us WHY they want code to do something. Knowing why, we can often find a better solution. So I'm going to guess — do you want this information so you can predict new observations at some later time? If so, you want to use the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_introcom_sect068.htm" target="_self"&gt;STORE statement in PROC SURVEYREG and then use PROC PLM&lt;/A&gt; to predict new observations at a later time.&lt;/P&gt;</description>
    <pubDate>Sun, 22 Oct 2023 21:39:33 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2023-10-22T21:39:33Z</dc:date>
    <item>
      <title>Adding spline effect</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Adding-spline-effect/m-p/899567#M83017</link>
      <description>&lt;P&gt;When I run the following code, I do not get the "parameterestimates" table. Instead, it gives the following warnings:&lt;/P&gt;&lt;P&gt;WARNING: Output 'ParameterEstimates' was not created. Make sure that the output object name, label,&lt;BR /&gt;or path is spelled correctly. Also, verify that the appropriate procedure options are used&lt;BR /&gt;to produce the requested output object. For example, verify that the NOPRINT option is not&lt;BR /&gt;used.&lt;BR /&gt;WARNING: Output 'SplineKnots' was not created. Make sure that the output object name, label, or path&lt;BR /&gt;is spelled correctly. Also, verify that the appropriate procedure options are used to&lt;BR /&gt;produce the requested output object. For example, verify that the NOPRINT option is not&lt;BR /&gt;used.&lt;BR /&gt;WARNING: Output 'ParameterEstimates' was not created. Make sure that the output object name, label,&lt;BR /&gt;or path is spelled correctly. Also, verify that the appropriate procedure options are used&lt;BR /&gt;to produce the requested output object. For example, verify that the NOPRINT option is not&lt;BR /&gt;used.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are my code. Any help please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc surveyreg data=zinc.imputed_srtd;;&lt;BR /&gt;weight nat_weight_bio;&lt;BR /&gt;cluster psu_no_ov;&lt;BR /&gt;strata newstrata;&lt;BR /&gt;class sex area edu_mt p_activity cat_crp;&lt;BR /&gt;format edu_mt edu. CAT_CRP CRP. AREA AREA.;&lt;BR /&gt;effect znspln = spline(zns_unic / naturalcubic basis=tpf(noint) knotmethod=PERCENTILELIST(5 27.5 50 72.5 95));&lt;BR /&gt;model mean_dbp = znspln age_in_yr sex area edu_mt p_activity cat_crp;&lt;BR /&gt;OUTPUT OUT=ZINC.RESIDUALS P=P_HAT L=LOWER U=UPPER;&lt;BR /&gt;ods select ParameterEstimates SplineKnots;&lt;BR /&gt;ods output ParameterEstimates=zinc.PE;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Oct 2023 14:22:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Adding-spline-effect/m-p/899567#M83017</guid>
      <dc:creator>Saifulinfs</dc:creator>
      <dc:date>2023-10-22T14:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Adding spline effect</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Adding-spline-effect/m-p/899578#M83018</link>
      <description>&lt;P&gt;I think the &lt;A href="https://communities.sas.com/t5/forums/replypage/board-id/sas_procedures/message-id/83017" target="_self"&gt;documentation for SURVEYREG&lt;/A&gt; is clear, you need the SOLUTION option to the MODEL statement in order to get the parameterestimates output to a data set.&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="PaigeMiller_0-1698008594880.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/89005iD29E10855D79C115/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PaigeMiller_0-1698008594880.png" alt="PaigeMiller_0-1698008594880.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure why you are not getting the SPLINEKNOTS output as well. If you run your PROC SURVEYREG, does the spline knots get written to the output? If so, try this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods trace on;
proc surveyreg;
    /* Other surveyreg commands go here */
run;
ods trace off;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The name of the tables are written to the log, one of them should be the SPLINEKNOTS table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don't say why you want this information in output data sets. This is a common failing here in the forums, some people don't tell us WHY they want code to do something. Knowing why, we can often find a better solution. So I'm going to guess — do you want this information so you can predict new observations at some later time? If so, you want to use the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_introcom_sect068.htm" target="_self"&gt;STORE statement in PROC SURVEYREG and then use PROC PLM&lt;/A&gt; to predict new observations at a later time.&lt;/P&gt;</description>
      <pubDate>Sun, 22 Oct 2023 21:39:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Adding-spline-effect/m-p/899578#M83018</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-10-22T21:39:33Z</dc:date>
    </item>
  </channel>
</rss>

