the example "simple linear regression" on page 3480 in sas documentation.
estimate of sigma2 in proc mcmc is 136.8,but my estimate of sigma2 is 112.7 in proc model using maximum likelihodd method .
what's the problem.thanks for answering.
the code of proc model:
PROC model data=sasuser.class;
dependent weight;
parm a b sig2;
weight=a+b*height;
errormodel weight~normal(sig2);
fit weight/method=marquardt;
run;
I just validated the analytic solution of MLE of sigma2,and got 112.7 too.
Not sure why you have this question. MCMC is a Bayesian procedure, and one does not expect to get the same results with Bayesian estimation as with MLE (or REML). With noninformative priors, you often get similar results, but not the same. You did not give the code for MCMC, so we cannot check if your program is correct. For your information, there are multiple versions of the SAS User's Guide, so it does not help to give a page number. You should give a chapter name and section/sub-section heading (or example number from the chapter).
Following on to lvm's comment:
The interval estimate from MCMC certainly contains the MLE estimate of sigma2, so the fact that the point estimates differ is really not relevant, given that entirely different algorithms are employed to derive the estimates.
I used your code for PROC MODEL and obtained the code for PROC MCMC from the online section Getting Started: MCMC Procedure - Simple Linear Regression. My variance estimate from MCMC was 137.3, slightly different from yours, and not wholly unexpected given differences in platforms, etc. I did duplicate your PROC MODEL output. However, I could not easily get a confidence interval for sigma2 from PROC MODEL, which would have made my point clearer. The credible intervals from MCMC for the other parameters look quite similar to the confidence intervals obtained from PROC MODEL.
Steve Denham
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!
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.