R^2 is unfortunately not a part of the output from the nonlinear regression (e.g. below) in the newer versions of SAS. But I need the adjusted r2 value or simple r2 (coefficient of determination) for my research manuscript. Please kindly modify my below proc programming that could also estimate the R2. Many thanks
Here is the complete data, please use it if you want
data large;
input sow stw time;
datalines;
4 3.366 3
4 3.052 6
4 2.666 9
4 2.755 12
4 2.203 15
4 1.886 18
3.982 1.525 21
3.882 1.547 24
3.393 0.81 27
3.586 0.76 30
2.295 0.27 33
3.475 0.67 36
;
proc nlin data=large method=marquardt;
parms B=0.5 R=0.1;
delta=0.000001;
s=sow**(1-B)-R*(1-B)*time;
if s>0 then stx=s**(1/(1-B));
else stx=0;
model stw=stx;
sb=(sow**(1-B+delta)-R*(1-B+delta)*time);
if sb>0 then sdb=(stx-sb**(1/(1-B+delta)))/delta;
else sdb=0;
der.B=sdb;
sr=(sow**(1-B)-(R-delta)*(1-B)*time);
if sr>0 then sdr=(stx-sr**(1/(1-B)))/delta;
else sdr=0;
der.R=sdr;
output out=largep p=pstw;
run;
It is helpful to those trying to help if you choose a single community to post questions to. This appears to be a duplicate of https://communities.sas.com/thread/86895 For this topic, I think the Statistical Procedures Community is your best resource.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.