BookmarkSubscribeRSS Feed
evardoodle
Fluorite | Level 6

Hello SAS Experts,

 

When using PROC GENMOD for a Bayes analysis, I noticed there is a substantial difference in my posterior estimates when entering in the exact same prior regression information using the coefficient means and full covariance matrix vs. the coefficient means and just the coeffient variances. I set a seed for reproducilibity and both models appear to achieve convergence. Please review my code, input priors, and results below.

 

Here is my code:

  proc genmod data=data;
  model DGSYTOT1 = totpcbla RIDAGEYR totpcbla_RIDAGEYR RIAGENDR smoker HSplus / dist=normal link=identity;
  bayes coeffprior=normal(input=prior)  seed=12345
  plots=all stats(percent=2.5 50 97.5) diagnostics=all outpost=post;
  run;

 

Here are the prior datasets with theoretically equivalent information:

 

prior.JPG

Here are the disparate results:

results.JPG

I would report very different interpretations of these results and I am not sure which results to trust. Can anyone explain why the input dataset structure matters so much? Is this an estimation error? Am I inputting something incorrectly?

 

Any help would be greatly appreciated. Thanks in advance!

 

Eva

1 REPLY 1
evardoodle
Fluorite | Level 6

A very helpful person helped me solve this problem. When you only input prior variances, SAS assumes all covariances are 0, it does not compute the actual covairances. I confirmed this by setting covariances to 0 in the covariance matrix and obtained the same results as inputing variances only.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 1 reply
  • 1354 views
  • 0 likes
  • 1 in conversation