dear all,
I have a question related to proc nlmixed. I am reading following SAS article:
The original SAS code in this article is:
proc nlmixed data=tree;
parms b1=190 b2=700 b3=350 s2u=1000 s2e=60;
num = b1+u1;
ex = exp(-(day-b2)/b3);
den = 1 + ex;
model y ~ normal(num/den,s2e);
random u1 ~ normal(0,s2u) subject=tree;
run;I changed the above code to following:
proc nlmixed data=tree;
parms b1=190 b2=700 b3=350 s2u=1000 s2e=60;
num = b1+u1;
ex = exp(-(day-b2)/b3);
den = 1 + ex;
lh = pdf('normal', y , num/den, s2e);
ll = log(lh);
model y ~ general(ll);
random u1 ~ normal(0,s2u) subject=tree;
run;
The parameter estimates of two codes are almost identical except for one parameter "s2e". The "s2e" from original code is 61.5; however the "s2e" from modified code is only 7.8.
I thought the two codes should give same results. Can anyone point out what went wrong in modified code?
Thank you very much!
The models are equivalent, but the code from the doc is estimating the variance whereas your code is estimating the standard deviation. Note that 61.5139 = (7.8430)**2
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.