<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Equivalence between PROC MCMC and PROC BCHOICE in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Equivalence-between-PROC-MCMC-and-PROC-BCHOICE/m-p/236440#M12527</link>
    <description>&lt;P&gt;Dear SAS Community.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to develop various discrete-choice (Probit) models including business knowledge through Bayesian priors defined on some parameters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So where specifically am I asking for support?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Is it possible to do Scoring on a Bayesian model defined with PROC MCMC, and ROC-Lift Curves?&lt;/LI&gt;&lt;LI&gt;I attach below the code defining a Bayesian Probit model with priors, along with the data (target and inputs). How can I define this model using PROC BCHOICE (including the priors on the betas and sigmas)?&lt;/LI&gt;&lt;LI&gt;Is it possible to score this model if I define it using PROC BCHOICE and generate ROC-Lift Curves?&lt;/LI&gt;&lt;/OL&gt;&lt;PRE&gt;proc import datafile=&amp;lt;Path||"datospruebasas.txt"&amp;gt;
     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;&lt;/PRE&gt;&lt;P&gt;Thank you for your attention.&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Lander Ibarra Iriondo.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Nov 2015 16:08:12 GMT</pubDate>
    <dc:creator>libarra</dc:creator>
    <dc:date>2015-11-25T16:08:12Z</dc:date>
    <item>
      <title>Equivalence between PROC MCMC and PROC BCHOICE</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Equivalence-between-PROC-MCMC-and-PROC-BCHOICE/m-p/236440#M12527</link>
      <description>&lt;P&gt;Dear SAS Community.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to develop various discrete-choice (Probit) models including business knowledge through Bayesian priors defined on some parameters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So where specifically am I asking for support?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Is it possible to do Scoring on a Bayesian model defined with PROC MCMC, and ROC-Lift Curves?&lt;/LI&gt;&lt;LI&gt;I attach below the code defining a Bayesian Probit model with priors, along with the data (target and inputs). How can I define this model using PROC BCHOICE (including the priors on the betas and sigmas)?&lt;/LI&gt;&lt;LI&gt;Is it possible to score this model if I define it using PROC BCHOICE and generate ROC-Lift Curves?&lt;/LI&gt;&lt;/OL&gt;&lt;PRE&gt;proc import datafile=&amp;lt;Path||"datospruebasas.txt"&amp;gt;
     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;&lt;/PRE&gt;&lt;P&gt;Thank you for your attention.&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Lander Ibarra Iriondo.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2015 16:08:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Equivalence-between-PROC-MCMC-and-PROC-BCHOICE/m-p/236440#M12527</guid>
      <dc:creator>libarra</dc:creator>
      <dc:date>2015-11-25T16:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Equivalence between PROC MCMC and PROC BCHOICE</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Equivalence-between-PROC-MCMC-and-PROC-BCHOICE/m-p/311737#M16443</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi Lander,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sorry for the late response: just came across your question about PROC BCHOICE.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am Amy Shi, and am part of the Bayesian Statistical Modeling group at SAS R&amp;amp;D that is responsible for putting together the BCHOICE and MCMC procedures.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the MODEL statement of BCHOICE, there is a&amp;nbsp;CPRIOR=NORMAL (options) specifies the prior distribution for the regression coefficients. The default is the normal prior Normal (mean=0, cov=100*Identity).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are interested and have more questions about BCHOICE, please write to amy.shi@sas.com&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Amy Shi&lt;/P&gt;&lt;P&gt;SAS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 15:32:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Equivalence-between-PROC-MCMC-and-PROC-BCHOICE/m-p/311737#M16443</guid>
      <dc:creator>amyshi</dc:creator>
      <dc:date>2016-11-15T15:32:59Z</dc:date>
    </item>
  </channel>
</rss>

