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;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.