Getting Started Example 1 for PROC MCMC
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: MCMCGS1 */
/* TITLE: Getting Started Example 1 for PROC MCMC */
/* PRODUCT: STAT */
/* SYSTEM: ALL */
/* KEYS: regression analysis */
/* PROCS: MCMC */
/* DATA: */
/* */
/* SUPPORT: Fang Chen */
/* REF: PROC MCMC, GETTING STARTED EXAMPLE 1 */
/* MISC: */
/****************************************************************/
ods graphics on;
proc mcmc data=sashelp.class outpost=classout nmc=10000 thin=2 seed=246810;
parms beta0 0 beta1 0;
parms sigma2 1;
prior beta0 beta1 ~ normal(mean = 0, var = 1e6);
prior sigma2 ~ igamma(shape = 3/10, scale = 10/3);
mu = beta0 + beta1*height;
model weight ~ n(mu, var = sigma2);
run;
ods graphics off;