[R-sig-ME] large discrepancy between p-values from mcmc-samplingand t-test

David Duffy David.Duffy at qimr.edu.au
Wed May 30 02:58:55 CEST 2012


On Mon, 28 May 2012, Martin Eklund wrote:

> My question concerns a large difference between p-values based on 
> mcmc-sampling from a lmer model and those based on t-tests.

You are relying on mcmcsamp here, which like everything else has been 
affected by various revisions of the lme4 code.  I think some versions 
were giving wrong answers, which I'm pretty sure is the case here (I 
double-checked this running in JAGS, where the 95%HPD looks more 
sensible: est=0.047, 0.016-0.075).

Bugs model:

  model
    {
       for( k in 1 : P ) {
          for( i in 1 : N ) {
             Y[i , k] ~ dnorm(m[i , k], tau1)
             m[i , k] <- mu + T[i , k] * phi / 2 + delta[i]
             T[i , k] <- 2*k - 3
          }
       }
       for( i in 1 : N ) {
          delta[i] ~ dnorm(0.0, tau2)
       }
       tau1 ~ dgamma(0.001, 0.001) sigma1 <- 1 / sqrt(tau1)
       tau2 ~ dgamma(0.001, 0.001) sigma2 <- 1 / sqrt(tau2)
       mu ~ dnorm(0.0, 1.0E-6)
       phi ~ dnorm(0.0, 1.0E-6)
    }


-- 
| David Duffy (MBBS PhD)                                         ,-_|\
| email: davidD at qimr.edu.au  ph: INT+61+7+3362-0217 fax: -0101  /     *
| Epidemiology Unit, Queensland Institute of Medical Research   \_,-._/
| 300 Herston Rd, Brisbane, Queensland 4029, Australia  GPG 4D0B994A v



More information about the R-sig-mixed-models mailing list