<?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 error: The BINOMIAL distribution of any_disorder (Obs = 1553) has an invalid probabili in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-mcmc-error-The-BINOMIAL-distribution-of-any-disorder-Obs/m-p/758816#M239671</link>
    <description>&lt;P&gt;Your problem is not continuous values but the specific value. Binomial parameter for P in general has a range of 0 to 1. A negative value makes no sense at all.&lt;/P&gt;
&lt;P&gt;You need to provide a value between 0 and 1 for P. That may require a pass through a data step to set an appropriate value for P. What that should be I have no clue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps you need to look at what creates P very closely and see why it is 1) negative and 2) outside of the intended range of use values (0 to 1). Perhaps some data outlier?&lt;/P&gt;</description>
    <pubDate>Mon, 02 Aug 2021 15:30:05 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2021-08-02T15:30:05Z</dc:date>
    <item>
      <title>proc mcmc error: The BINOMIAL distribution of any_disorder (Obs = 1553) has an invalid probability</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-mcmc-error-The-BINOMIAL-distribution-of-any-disorder-Obs/m-p/758745#M239643</link>
      <description>&lt;P&gt;Dear experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to apply SAS code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc mcmc data=crp nbi=50000 nmc=100000 outpost=OutData&lt;BR /&gt;init = random monitor=(lw1 lw2 lw3 beta0 delta w);&lt;BR /&gt;parms lw1 lw2 lw3 ;&lt;BR /&gt;array w[3];&lt;BR /&gt;w[1] = exp(lw1)/(exp(lw1)+ exp(lw2)+ exp(lw3));&lt;BR /&gt;w[2] = exp(lw2)/(exp(lw1)+ exp(lw2)+ exp(lw3));&lt;BR /&gt;w[3] = exp(lw3)/(exp(lw1)+ exp(lw2)+ exp(lw3));&lt;BR /&gt;parms beta0 delta ;&lt;BR /&gt;prior beta0 ~ cauchy(0,2.5);&lt;BR /&gt;prior delta ~ cauchy(0,2.5);&lt;BR /&gt;prior lw1 ~ beta(1,1);&lt;BR /&gt;prior lw2 ~ beta(1,1);&lt;BR /&gt;prior lw3 ~ beta(1,1);&lt;BR /&gt;p = beta0+ delta*(w[1]*cesd12+w[2]*cesd22+w[3]*cesd32);&lt;BR /&gt;model any_disorder ~ binomial(1,p);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;recommended is this paper&amp;nbsp;&lt;A href="https://pubmed.ncbi.nlm.nih.gov/29912384/" target="_blank"&gt;https://pubmed.ncbi.nlm.nih.gov/29912384/&lt;/A&gt; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;to examine&amp;nbsp;how a time-varying exposure cesd affects health outcome any_disorder later in life. The code seems to be working when my exposure is binary, but when I am trying to use continuous exposure, I get this error&amp;nbsp;ERROR: The BINOMIAL distribution of any_disorder (Obs = 1553) has an invalid probability -1.12646636. Use an appropriate parameter value instead. Could you you help me to modify the code such that it would work with continuous exposure variables?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: The BINOMIAL distribution of any_disorder (Obs = 1553) has an invalid probability&lt;BR /&gt;-1.12646636. Use an appropriate parameter value instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2021 10:57:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-mcmc-error-The-BINOMIAL-distribution-of-any-disorder-Obs/m-p/758745#M239643</guid>
      <dc:creator>Polina_UH</dc:creator>
      <dc:date>2021-08-02T10:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: proc mcmc error: The BINOMIAL distribution of any_disorder (Obs = 1553) has an invalid probabili</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-mcmc-error-The-BINOMIAL-distribution-of-any-disorder-Obs/m-p/758758#M239652</link>
      <description>I am sorry, I forgot to mention that I have modified the original part of the code&lt;BR /&gt;p = logistic(beta0+ delta*(w[1]*cesd12_binary+w[2]*cesd22_binary+w[3]*cesd32_binary));&lt;BR /&gt;&lt;BR /&gt;to p = beta0+ delta*(w[1]*cesd12+w[2]*cesd22+w[3]*cesd32); to accommodate continuous nature of the variables</description>
      <pubDate>Mon, 02 Aug 2021 11:56:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-mcmc-error-The-BINOMIAL-distribution-of-any-disorder-Obs/m-p/758758#M239652</guid>
      <dc:creator>Polina_UH</dc:creator>
      <dc:date>2021-08-02T11:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: proc mcmc error: The BINOMIAL distribution of any_disorder (Obs = 1553) has an invalid probabili</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-mcmc-error-The-BINOMIAL-distribution-of-any-disorder-Obs/m-p/758816#M239671</link>
      <description>&lt;P&gt;Your problem is not continuous values but the specific value. Binomial parameter for P in general has a range of 0 to 1. A negative value makes no sense at all.&lt;/P&gt;
&lt;P&gt;You need to provide a value between 0 and 1 for P. That may require a pass through a data step to set an appropriate value for P. What that should be I have no clue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps you need to look at what creates P very closely and see why it is 1) negative and 2) outside of the intended range of use values (0 to 1). Perhaps some data outlier?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2021 15:30:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-mcmc-error-The-BINOMIAL-distribution-of-any-disorder-Obs/m-p/758816#M239671</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-08-02T15:30:05Z</dc:date>
    </item>
  </channel>
</rss>

