# first, a quick look at the example data...
str(SS_data)
str(SS_out$sims.list$ypp)
# plotting the example posterior predictive distribution with the data
# points overlayed. Note the overdispersion in the posterior predictive.
caterpillar(SS_out, p="ypp")
points(SS_data$y)
# using a jagsUI object as ypp input
qq_postpred(ypp=SS_out, p="ypp", y=SS_data$y)
# using a matrix as ypp input
qq_postpred(ypp=SS_out$sims.list$ypp, y=SS_data$y)
Run the code above in your browser using DataLab