Obsidian | Level 7

## STORE equivalent in PROC MCMC

I am fitting a logistic regression in PROC MCMC and need to calculate the 95% HPD Credible Interval on the Odds Ratio (exponentiated) scale for each chain before taking the average across chains. Rather than taking the average posterior mean(s) and interval values and then exponentiating, I need to exponentiate means and interval values and then take the average. The BAYES statement has the STORE option so that posterior samples and 95% CrI can be determined. Note: I need to use PROC MCMC, so any solutions with GENMOD aren't desired.

How could I accomplish this, either through an existing statement or through a manual calculation? Thanks!

``````proc mcmc data=data.XX
plots=all
nbi=1000
nmc=9000
seed=123
dic
plots(smooth)=all
statistics=all
outpost=post1;
parms (beta0 B_tx) 0;
prior beta0 ~ normal(0,var=1);
prior B_tx ~ normal(0,var=1);
p = logistic(beta0 + B_tx*tx);
model outcome ~ binary(p);
run;``````
1 ACCEPTED SOLUTION

Accepted Solutions
SAS Employee

## Re: STORE equivalent in PROC MCMC

You could do something similar to this example in the documentation to compute posteriors for the odds ratios.

SAS Help Center: Missing at Random Analysis

SAS Employee

## Re: STORE equivalent in PROC MCMC

You could do something similar to this example in the documentation to compute posteriors for the odds ratios.

SAS Help Center: Missing at Random Analysis

Discussion stats