Good day
I want to obtain the R squared to certain the accuracy of my gompertz model. I have run the analysis below and it converged, however I am stuck as I can not compute the R squared for the model to know much variation is explained by this model.
data sam;
input wb genotype$ week wght bwo;
datalines;
.
.
.
;
run;
proc sort data=sam; by genotype; run;
proc nlin data=sam;
by genotype;
parameters L 0.2 K 0.1; /* initial guess of L & K */
model WGHT = Bwo * EXP(L/K*(1- EXP(-K*WEEK))); /* using initial body weight as a variable since it was phentypically recorded*/
ESTIMATE 'lk_bw_FE' exp(L / K);
ESTIMATE 'lk_1_bw_infl' exp((L / K)-1);
ESTIMATE 'TI' (1 / K) * abs(log(L / K)); /*estimates age which growth rate was maximum*/
output out=sam1 predicted=Pred lclm=Lower95 uclm=Upper95;
run;
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 the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.