<?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 Re: PROC MCMC Warning in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MCMC-Warning/m-p/452719#M23658</link>
    <description>&lt;P&gt;Thanks for the support&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now with this code modification its working without any warning !!!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp; random resn_pred_act ~binary(theta_act) subject= n_po_act monitor=(resn_pred_act);&lt;BR /&gt;&amp;nbsp; random&amp;nbsp; resn_pred_ctrl~binary(theta_ctrl) subject=n_po_ctrl monitor=(resn_pred_ctrl);&lt;/P&gt;</description>
    <pubDate>Tue, 10 Apr 2018 06:51:50 GMT</pubDate>
    <dc:creator>JOmy</dc:creator>
    <dc:date>2018-04-10T06:51:50Z</dc:date>
    <item>
      <title>PROC MCMC Warning</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MCMC-Warning/m-p/451823#M23609</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC MCMC is giving&amp;nbsp; "WARNING: Use the RAND function with caution. The function should not be used in constructing the likelihood function or modifying model-related symbols in the program. This typically would lead to incorrect posterior inferences."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it a general warning or is something wrong which we have to check ?&lt;/P&gt;&lt;P&gt;Any guidance on this will be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 11:12:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MCMC-Warning/m-p/451823#M23609</guid>
      <dc:creator>JOmy</dc:creator>
      <dc:date>2018-04-06T11:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MCMC Warning</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MCMC-Warning/m-p/451921#M23610</link>
      <description>&lt;P&gt;It never hurts to post the code in question. It will avoid getting suggestions / comments involving options you already used or didn't use and may provide additional information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I might suggest running the proc with the same input data (possibly a small set)&amp;nbsp;repeatedly and see if you get the same results each time. If not you have an example of why it may not be a good idea.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 14:51:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MCMC-Warning/m-p/451921#M23610</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-04-06T14:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MCMC Warning</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MCMC-Warning/m-p/452013#M23611</link>
      <description>&lt;P&gt;If you are using the&amp;nbsp;RAND statement as part of the construction of the likelihood function, then that is not acceptable. The likelihood function must be a function of the parameters, given the data. As Ballardw&amp;nbsp;said, post your code and we&amp;nbsp;might be able to offer more concrete suggestions. (For example, if you are trying to incorporate random effects, we can tell you to use the RANDOM statement, not the RAND function.)&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 17:51:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MCMC-Warning/m-p/452013#M23611</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-04-06T17:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MCMC Warning</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MCMC-Warning/m-p/452414#M23622</link>
      <description>&lt;P&gt;Thanks for the support offered&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please find the code,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods graphics on;&lt;BR /&gt;proc mcmc data=input nmc=&amp;amp;nmc nbi=&amp;amp;nbi monitor=(_parms_ resn_pred_act resn_pred_ctrl resn_eos_act resn_eos_ctrl diff) diagnostics=(mcse autocorr ess)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; statistics=(summary intervals) stats(alpha=0.20) outpost=pred;&lt;BR /&gt;/*** Set up the constants for the beta distributions (a and b) ***/&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; begincnst;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a_act=1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b_act=1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a_ctrl=1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b_ctrl=1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; endcnst;&lt;/P&gt;&lt;P&gt;/*** Priors: distributions and initial values ***/&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; prior theta_act ~ beta(a_act,b_act);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; prior theta_ctrl ~ beta(a_ctrl,b_ctrl);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; parms theta_act 0.5 theta_ctrl 0.5;&lt;/P&gt;&lt;P&gt;/*** Likelihood ***/&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; model resn_ia_act ~ binomial(n_ia_act,theta_act);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; model resn_ia_ctrl ~ binomial(n_ia_ctrl,theta_ctrl);&lt;/P&gt;&lt;P&gt;/*** Predicted number of responders in the remaining sample (n - n_ia)***/&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; resn_pred_act = rand("binomial", theta_act, n_po_act); /*_p0: post interim*/&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; resn_pred_ctrl = rand("binomial", theta_ctrl, n_po_ctrl);&lt;/P&gt;&lt;P&gt;/*** Number of responders at the end of the study = ia + pred ***/&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; resn_eos_act = resn_ia_act + resn_pred_act;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; resn_eos_ctrl = resn_ia_ctrl + resn_pred_ctrl;&lt;/P&gt;&lt;P&gt;/*** Determine the probability that the difference is greater than 30% ***/&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; diff = theta_act - theta_ctrl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ods output PostSummaries=posterior1 PostIntervals=posterior2;&lt;BR /&gt;run;&lt;BR /&gt;ods graphics off;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 06:18:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MCMC-Warning/m-p/452414#M23622</guid>
      <dc:creator>JOmy</dc:creator>
      <dc:date>2018-04-09T06:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MCMC Warning</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MCMC-Warning/m-p/452477#M23624</link>
      <description>&lt;P&gt;Your use of the RAND function is incorrect. The "&lt;SPAN&gt;Predicted number of responders" cannot be random. I assume you either want to use the PDF function or the CDF function. To understand the difference between random values, densities, probabilities, and quantiles, see &lt;A href="https://blogs.sas.com/content/iml/2011/10/19/four-essential-functions-for-statistical-programmers.html" target="_self"&gt;"Four essential functions for statistical programmers."&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 12:03:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MCMC-Warning/m-p/452477#M23624</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-04-09T12:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MCMC Warning</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MCMC-Warning/m-p/452719#M23658</link>
      <description>&lt;P&gt;Thanks for the support&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now with this code modification its working without any warning !!!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp; random resn_pred_act ~binary(theta_act) subject= n_po_act monitor=(resn_pred_act);&lt;BR /&gt;&amp;nbsp; random&amp;nbsp; resn_pred_ctrl~binary(theta_ctrl) subject=n_po_ctrl monitor=(resn_pred_ctrl);&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 06:51:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MCMC-Warning/m-p/452719#M23658</guid>
      <dc:creator>JOmy</dc:creator>
      <dc:date>2018-04-10T06:51:50Z</dc:date>
    </item>
  </channel>
</rss>

