--
You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to r-inla-discussion...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/r-inla-discussion-group/62f11414-279e-49b4-a2b5-98b72b27af03n%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to r-inla-discussion...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/r-inla-discussion-group/44101b01551731fd63935f3296bfce333bdc01e6.camel%40r-inla.org.
Sorry, I had forgotten to include the BayesFunctions – attached now.
The rlgamma function is in from the VGAM package.
I think the reason why brms is not bothered by the discrepancy between its prior and the sampling function is that the prior on random effects does not affect the posterior on fixed effects.
All the best
Klaus
plot.ecdf(rlgamma(1e4,15,0.3)^-0.5,col=1,xlim=c(0,1.5))
plot.ecdf(rgamma(1e4,15,0.3)^-0.5,col=2,add=TRUE)
plot.ecdf(rgamma(1e4,1,4),col=3,add=TRUE)> ks.test(rank.brms[1:35],rank.inla[1:35])
Exact two-sample Kolmogorov-Smirnov test
data: rank.brms[1:35] and rank.inla[1:35]
D = 0.11429, p-value = 0.9794 alternative hypothesis: two-sidedHi Finn,
thanks for explaining how the prior on random effects works in INLA. And I take your point about the prior on the trial-by-trial noise, which I had left implicit.
Good to see that the discrepancy is now resolved. Would you be willing to share your code so that I can make sure to apply INLA correctly to (linear) mixed-effects models?
All the best
Dear Finn,
thanks a lot. I reproduced your result with 2000 simulations, and INLA now produces a uniform rank distribution, showing good calibration.
I also tried a different approach, explicitly adding a prior on the trial-by-trial noise within cells to INLA that matches the sampling distribution for that noise in the data generation (an exponential distribution with rate=1). Again, INLA (as well as brms) show good calibration.
It looks like the default prior of INLA on trial-by-trial noise led to the miscalibration in my previous simulations, whereas the default prior for trial-by-trial noise in brms did not. I’m curious now: What is the default prior in INLA? In brms it is a half-Student-t(3, 0, 0.25) on SD.