<?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: How to calculate the AIC, BIC, RMSE, and R2 for a Nonlinear regression model? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-the-AIC-BIC-RMSE-and-R2-for-a-Nonlinear/m-p/791705#M38806</link>
    <description>According to code "  sl~normal(m,s)  "  ==&amp;gt; s is the std of normal .</description>
    <pubDate>Sun, 23 Jan 2022 11:22:29 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2022-01-23T11:22:29Z</dc:date>
    <item>
      <title>How to calculate the AIC, BIC, RMSE, and R2 for a Nonlinear regression model?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-the-AIC-BIC-RMSE-and-R2-for-a-Nonlinear/m-p/791656#M38799</link>
      <description>&lt;P&gt;I am using the von Bertalanffy growth function (VBGF), but the PROC STATEMENT does not provide model fitness parameters such as AIC, BIC, RMSE, and R2? Need help to revise the PROC STATEMENT.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;FILENAME REFFILE '/home/u58890255/Growth  functions/sample_data.xlsx';
PROC IMPORT DATAFILE=REFFILE
	DBMS=XLSX
	OUT=WORK.IMPORT;
	GETNAMES=YES;
RUN;
PROC CONTENTS DATA=WORK.IMPORT; RUN;

title 'von Bertalanffy growth function';
data exp;
set WORK.IMPORT;
if expno=1;
run;
proc nlin data=exp method=marquardt;
parms Linf=190 k=0.05 t0=-1.5;
model sl=Linf*(1-exp(-k*(age-t0)));
output out=expp p=pLinf r=Linf_residual;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Using the following PROC STATEMENT,&amp;nbsp; I can calculate the adjusted R2 for a Nonlinear regression model, but this time the following PROC also does not provide any result&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc summary data=expp;
     var Linf_residual Linf;
     output out=stats css(Linf)=sstot uss(Linf_residual)=ssres N=N;
run;
data expp;
     set stats;
     rsquared=1-(ssres/sstot);
     adjrsquared = 1-(1-rsquared)*(N-1) / (N- 3  -1);
run;
proc print data=expp;
run; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Kind regards,&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jan 2022 18:52:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-the-AIC-BIC-RMSE-and-R2-for-a-Nonlinear/m-p/791656#M38799</guid>
      <dc:creator>ukhan</dc:creator>
      <dc:date>2022-01-22T18:52:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the AIC, BIC, RMSE, and R2 for a Nonlinear regression model?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-the-AIC-BIC-RMSE-and-R2-for-a-Nonlinear/m-p/791669#M38800</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Success! We moved this post to "statistical_procedures" board.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jan 2022 21:09:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-the-AIC-BIC-RMSE-and-R2-for-a-Nonlinear/m-p/791669#M38800</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-01-22T21:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the AIC, BIC, RMSE, and R2 for a Nonlinear regression model?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-the-AIC-BIC-RMSE-and-R2-for-a-Nonlinear/m-p/791676#M38803</link>
      <description>&lt;P&gt;Use PROC NLMIXED instead of PROC NLIN - it's a bit more flexible (particularly if the response is not normal) and provides AIC and BIC. For an R-square, you can use the generalized R-square discussed in &lt;A href="http://support.sas.com/kb/67880" target="_self"&gt;this note&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc nlmixed data=import;
where expno=1;
m=Linf*(1-exp(-k*(age-t0)));
model sl~normal(m,s);
predict m out=out;
run;
data out; set out;
res=sl-pred;
run;
proc sql; 
select 1-(uss(res)/css(sl)) as R2 from out;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 22 Jan 2022 21:42:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-the-AIC-BIC-RMSE-and-R2-for-a-Nonlinear/m-p/791676#M38803</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2022-01-22T21:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the AIC, BIC, RMSE, and R2 for a Nonlinear regression model?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-the-AIC-BIC-RMSE-and-R2-for-a-Nonlinear/m-p/791695#M38805</link>
      <description>&lt;P&gt;Great, it works perfectly. Kind of you &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;. Could you please also explain what is the new parameter “s” (please check the attached screenshot)?&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2022-01-23 102149.png" style="width: 662px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67632iF562B1DC42633CE5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2022-01-23 102149.png" alt="Screenshot 2022-01-23 102149.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jan 2022 07:25:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-the-AIC-BIC-RMSE-and-R2-for-a-Nonlinear/m-p/791695#M38805</guid>
      <dc:creator>ukhan</dc:creator>
      <dc:date>2022-01-23T07:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the AIC, BIC, RMSE, and R2 for a Nonlinear regression model?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-the-AIC-BIC-RMSE-and-R2-for-a-Nonlinear/m-p/791705#M38806</link>
      <description>According to code "  sl~normal(m,s)  "  ==&amp;gt; s is the std of normal .</description>
      <pubDate>Sun, 23 Jan 2022 11:22:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-the-AIC-BIC-RMSE-and-R2-for-a-Nonlinear/m-p/791705#M38806</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-01-23T11:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the AIC, BIC, RMSE, and R2 for a Nonlinear regression model?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-the-AIC-BIC-RMSE-and-R2-for-a-Nonlinear/m-p/791719#M38807</link>
      <description>Thank you so much for the help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Sun, 23 Jan 2022 17:19:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-the-AIC-BIC-RMSE-and-R2-for-a-Nonlinear/m-p/791719#M38807</guid>
      <dc:creator>ukhan</dc:creator>
      <dc:date>2022-01-23T17:19:30Z</dc:date>
    </item>
  </channel>
</rss>

