[R-sig-ME] MCMCglmm: predictions for posterior predictive checks

Ramon Diaz-Uriarte rdiaz02 at gmail.com
Sat Mar 1 12:44:04 CET 2014


Dear List,

I want to perform a simple posterior predictive check on some Poisson
models I've fitted using MCMCglmm. I immediately though about using
predict.MCMCglmm as

predict(mymodel, type = "response", marginal = 0, interval = "prediction")

However, predict returns the expectation (in fact one of its very last
lines have pred <- matrix(colMeans(post.pred), dim(post.pred)[2], 1)).


I can hack predict.MCMCglmm and directly return the "post.pred" object
which, IIUC, would give me the "y^{rep}" (in Gelman et al., 1996,
notation.).  But having to do this makes me wonder if I am understanding
this correctly.

Is directly using the "post.pred" object the right way of getting the
y^{rep} with MCMCglmm?


Best,


R.




P.S. I am using "marginal = 0" as I want what, e.g., Green et al., 2009
("Use of posterior predictive assessments to evaluate model fit in
multilevel logistic regression", Vet. Res, 40) call "full": "The predictive
distribution was conditional on all fixed effect and random effect
parameters estimated in the final model and a replicate observation
y_{ijk}^{full} generated from the conditional distribution (...)".

-- 
Ramon Diaz-Uriarte
Department of Biochemistry, Lab B-25
Facultad de Medicina 
Universidad Autónoma de Madrid 
Arzobispo Morcillo, 4
28029 Madrid
Spain

Phone: +34-91-497-2412

Email: rdiaz02 at gmail.com
       ramon.diaz at iib.uam.es

http://ligarto.org/rdiaz



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