I am trying to fit a logistic regression model to a dataset that where the outcome is binary (0, 1), and the independent variable is treatment group (2 values, 0 and 1). I would like a beta (1,1) / Uniform(0, 1) prior on the probability of success, p.
I am using the following code to model the outcome. There are missing values in the outcome variable which are excluded from the analysis using proc genmod.
Question: Is it possible to impute missing values in proc genmod, so all of the data can be used in the analysis?
/***************************************************************************************/
proc genmod data=ds; model s = trt /d=bin link=logit; bayes seed=17 coeffprior=uniform nmc=20000 thin=2 outpost=outgen; run;
/***************************************************************************************/
As an alternative, I am using proc mcmc which imputes the missing outcome values. But, I am a bit confused on how to assign a beta prior to the parameter p in the binomial distribution.
/***************************************************************************************/
proc mcmc data=ds seed=123 outpost=logit_bayes nbi=1000 nmc=10000 nthin=1 DIC statistics=all diagnostics=all; parms (beta0 beta1 /*p*/); prior beta0 ~ normal(0, var=10000); prior beta1 ~ normal(0, var=10000); /*prior p ~ beta(1,1);*/ p=logistic(beta0 + beta1*trt); model s ~ binomial(1,p); run;
/***************************************************************************************/
Question: Is there a way to modify/change the mcmc code above to specify a beta prior so inferences about the parameter p can be made?
... View more