<?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 in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MCMC-error/m-p/144235#M7566</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, the big difference is in the distributions, so when you say "the only difference between my model and the example model is that the response variable in the example is a continues variable and has a normal distribution while in my model the response is a dichotomous variable and thus has a binary distribution", you are making a ginormous change.&amp;nbsp; I'll through two things out, neither of which is going to get this to start converging ( I don't think).&amp;nbsp; First, since the Monte Carlo part of the procedure depends on the parameter starting values, make sure that the variance and covariance estimates refer to the logits of the data.&amp;nbsp; Using the values from the normal distribution won't suffice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second, why?&amp;nbsp; Why dichoomize the data when you have a very good analysis treating the response variable as continuous?&amp;nbsp; Dichotomization throws away a LOT of information, and immediately reduces the power of the analysis.&amp;nbsp; For example, see the paper presented by Dr. Stephen Senn at the 2011 FDA/industry Statistics Workshop, in the short course, Statistical Issues in Drug Development.&amp;nbsp; From Section 3, slides 29 and 30:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Slide 29:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dichotomisation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Prospects for a Cure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I am pessimistic&lt;/LI&gt;&lt;LI&gt;Most physicians seem happy with dichotomisation&lt;/LI&gt;&lt;LI&gt;Most statisticians seem happy to indulge them&lt;UL&gt;&lt;LI&gt;"That's not my dpartment' syndrome&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;We have to bring home the following message:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Slide 30&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DICHOTOMISATION IS VERY SILLY!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your problem points out one of the drawbacks Dr. Senn was trying to make.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jan 2014 19:25:40 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2014-01-17T19:25:40Z</dc:date>
    <item>
      <title>PROC MCMC error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MCMC-error/m-p/144234#M7565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All;&lt;/P&gt;&lt;P&gt;I am trying to create a Bayesian Logistic Hierarchical using proc MCMC. I am using the exact dataset and codes provided by SAS in the example in the following link, &lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_mcmc_sect056.htm" style="font-size: 10pt; line-height: 1.5em;" title="http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_mcmc_sect056.htm"&gt;SAS Official Manual Example&lt;/A&gt;&lt;/P&gt;&lt;P&gt;the only difference between my model and the example model is that the response variable in the example is a continues variable and has a normal distribution while in my model the response is a dichotomous variable and thus has a binary distribution. &lt;/P&gt;&lt;P&gt;I create a new variable in the data-set, called overweight which is equal to 1 if the Rat's weight is above average and zero otherwise and then try to model the probability of being over weight as a logistic function of age. &lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;data rats;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;array days[5] (8 15 22 29 36);&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;input weight @@;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;subject = ceil(_n_/5);&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;index = mod(_n_-1, 5) + 1;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;age = days[index];&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;drop index days:;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;datalines;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;151 199 246 283 320 145 199 249 293 354&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;147 214 263 312 328 155 200 237 272 297&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;135 188 230 280 323 159 210 252 298 331&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;141 189 231 275 305 159 201 248 297 338&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;177 236 285 350 376 134 182 220 260 296&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;160 208 261 313 352 143 188 220 273 314&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;154 200 244 289 325 171 221 270 326 358&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;163 216 242 281 312 160 207 248 288 324&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;142 187 234 280 316 156 203 243 283 317&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;157 212 259 307 336 152 203 246 286 321&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;154 205 253 298 334 139 190 225 267 302&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;146 191 229 272 302 157 211 250 285 323&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;132 185 237 286 331 160 207 257 303 345&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;169 216 261 295 333 157 205 248 289 316&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;137 180 219 258 291 153 200 244 286 324&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;run;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;data rats;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;set rats;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;if weight&amp;gt;242 then overweight=1; else overweight=0;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;proc mcmc data=rats nmc=10000&amp;nbsp; outpost=postout&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;seed=17 init=random;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;ods select Parameters REParameters PostSummaries;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;array theta[2] alpha beta;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;array theta_c[2];&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;array Sig_c[2,2];&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;array mu0[2];&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;array Sig0[2,2];&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;array S[2,2] (0.02 0 0 20);&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;begincnst;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;call zeromatrix(mu0);&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;call identity(Sig0);&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;call mult(Sig0, 1000, Sig0);&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;endcnst;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;parms theta_c Sig_c {121 0 0 0.26} var_y;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;prior theta_c ~ mvn(mu0, Sig0);&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;prior Sig_c ~ iwish(2, S);&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;prior var_y ~ igamma(0.01, scale=0.01);&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;random theta ~ mvn(theta_c, Sig_c) subject=subject;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;mu = logistic(alpha + beta * age+var_y );&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;model overweight~ binary(mu);&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;/P&gt;&lt;P&gt;When I run the model, I get this error message, &lt;/P&gt;&lt;P&gt; &lt;STRONG style="text-decoration: underline;"&gt;Observation 2 of the response variable has a value of 0, and it does not &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;produce a positive log-likelihood value. Possible causes are: the response variable is &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;outside of the support set of the likelihood function or some distribution parameters&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you please help me with this issue? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; are missing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 02:35:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MCMC-error/m-p/144234#M7565</guid>
      <dc:creator>niam</dc:creator>
      <dc:date>2014-01-17T02:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MCMC error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MCMC-error/m-p/144235#M7566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, the big difference is in the distributions, so when you say "the only difference between my model and the example model is that the response variable in the example is a continues variable and has a normal distribution while in my model the response is a dichotomous variable and thus has a binary distribution", you are making a ginormous change.&amp;nbsp; I'll through two things out, neither of which is going to get this to start converging ( I don't think).&amp;nbsp; First, since the Monte Carlo part of the procedure depends on the parameter starting values, make sure that the variance and covariance estimates refer to the logits of the data.&amp;nbsp; Using the values from the normal distribution won't suffice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second, why?&amp;nbsp; Why dichoomize the data when you have a very good analysis treating the response variable as continuous?&amp;nbsp; Dichotomization throws away a LOT of information, and immediately reduces the power of the analysis.&amp;nbsp; For example, see the paper presented by Dr. Stephen Senn at the 2011 FDA/industry Statistics Workshop, in the short course, Statistical Issues in Drug Development.&amp;nbsp; From Section 3, slides 29 and 30:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Slide 29:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dichotomisation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Prospects for a Cure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I am pessimistic&lt;/LI&gt;&lt;LI&gt;Most physicians seem happy with dichotomisation&lt;/LI&gt;&lt;LI&gt;Most statisticians seem happy to indulge them&lt;UL&gt;&lt;LI&gt;"That's not my dpartment' syndrome&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;We have to bring home the following message:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Slide 30&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DICHOTOMISATION IS VERY SILLY!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your problem points out one of the drawbacks Dr. Senn was trying to make.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 19:25:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MCMC-error/m-p/144235#M7566</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-01-17T19:25:40Z</dc:date>
    </item>
  </channel>
</rss>

