07-06-2012 09:20 PM
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;
parm a b sig2;
07-09-2012 10:28 AM
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).
07-10-2012 07:54 AM
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.