BookmarkSubscribeRSS Feed
cxz_hqu_edu_cn
Calcite | Level 5

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;

3 REPLIES 3
cxz_hqu_edu_cn
Calcite | Level 5

I just validated the analytic solution of MLE of sigma2,and got 112.7 too.

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

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).

SteveDenham
Jade | Level 19

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 3 replies
  • 1481 views
  • 0 likes
  • 3 in conversation