Dear SAS Community.
I am trying to develop various discrete-choice (Probit) models including business knowledge through Bayesian priors defined on some parameters.
I have developed a test with PROC MCMC but I don’t know if this procedure allows to score the model directly (find below the SAS code I am using and the data to launch the model).
In parallel, I have found that there is a procedure, PROC BCHOICE (experimental on version 9.4.), that allows to create and estimate Bayesian models. However I can not find explicit instructions on how to define priors over parameters, linear combinations, orders between parameters, etc. I. e., how to define a Probit model with Bayesian restrictions on its parameters.
So where specifically am I asking for support?
proc import datafile=<Path||"datospruebasas.txt"> out=work.vmctrans dbms=csv replace; getnames=yes; run; proc mcmc data=work.vmctrans outpost=classout2 nmc=5000 thin=5 seed=246810; parms beta0 1 beta1 1 beta2 1 beta3 1 beta4 1 beta5 1 beta6 1 beta7 1 beta8 1 beta9 1 beta10 1 beta11 1 beta12 1 beta13 1 beta14 1 beta15 1 beta16 1 beta17 1; /* Beta Ini_Val */ parms sigma2 1; /*Sigma2 Ini_Val*/ prior beta0 ~ normal(mean=2, var=1000); /* Prior Normal mu=2 and var = 10000 */ prior beta1 ~ normal(mean=1.1, var=1000, LOWER=0, UPPER=1.2); prior beta2 ~ normal(mean=1.1, var=1000, LOWER=0, UPPER=1.2); prior beta3 ~ normal(mean=1.1, var=1000, LOWER=0, UPPER=1.2); prior beta4 ~ normal(mean=1.1, var=1000, LOWER=0, UPPER=1.2); prior beta5 ~ normal(mean=1.1, var=1000, LOWER=0, UPPER=1.2); prior beta6 ~ normal(mean=1.1, var=1000, LOWER=0, UPPER=1.2); prior beta7 ~ normal(mean=1.1, var=1000, LOWER=0, UPPER=1.2); prior beta8 ~ normal(mean=1.1, var=1000, LOWER=0, UPPER=1.2); prior beta9 ~ normal(mean=1.1, var=1000, LOWER=0, UPPER=1.2); prior beta10 ~ normal(mean=1.1, var=1000, LOWER=0, UPPER=1.2); prior beta11 ~ normal(mean=1.1, var=1000, LOWER=0, UPPER=1.2); prior beta12 ~ normal(mean=1.1, var=1000, LOWER=0, UPPER=1.2); prior beta13 ~ normal(mean=1.1, var=1000, LOWER=0, UPPER=1.2); prior beta14 ~ normal(mean=1.1, var=1000, LOWER=0, UPPER=1.2); prior beta15 ~ normal(mean=1.1, var=1000, LOWER=0, UPPER=1.2); prior beta16 ~ normal(mean=1.1, var=1000, LOWER=0, UPPER=1.2); prior beta17 ~ normal(mean=1.1, var=1000, LOWER=0, UPPER=1.2); prior sigma2 ~ gamma(shape=3, scale=1); /* Prior para la sigma del output */ mu = beta0 + beta1*TRANS_X1 + beta2*TRANS_X2 + beta3*TRANS_X3 + beta4*TRANS_X4 + beta5*TRANS_X5 + beta6*TRANS_X6 + beta7*TRANS_X7 + beta8*TRANS_X8 + beta9*TRANS_X9 + beta10*TRANS_X10 + beta11*TRANS_X11 + beta12*TRANS_X12 + beta13*TRANS_X13 + beta14*TRANS_X14 + beta15*TRANS_X15 + beta16*TRANS_X16 + beta17*TRANS_X17; model probmig ~ normal(mu, var=sigma2); run;
Thank you for your attention.
Sincerely,
Lander Ibarra Iriondo.
Hi Lander,
Sorry for the late response: just came across your question about PROC BCHOICE.
I am Amy Shi, and am part of the Bayesian Statistical Modeling group at SAS R&D that is responsible for putting together the BCHOICE and MCMC procedures.
In the MODEL statement of BCHOICE, there is a CPRIOR=NORMAL (options) specifies the prior distribution for the regression coefficients. The default is the normal prior Normal (mean=0, cov=100*Identity).
If you are interested and have more questions about BCHOICE, please write to amy.shi@sas.com
Thanks,
Amy Shi
SAS
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.