| posteriorPredictive {CNPBayes} | R Documentation |
Simulating from the posterior predictive distribution can be helpful for assessing the adequacy of the mixture model.
posteriorPredictive(model)
model |
a SingleBatchModel or MultiBatchModel |
model <- SingleBatchModelExample
mp <- McmcParams(iter=200, burnin=50)
mcmcParams(model) <- mp
model <- posteriorSimulation(model)
pd <- posteriorPredictive(model)
if(FALSE) qqplot(pd, y(model))
## Not run:
bmodel <- MultiBatchModelExample
mp <- McmcParams(iter=500, burnin=150, nStarts=20)
mcmcParams(bmodel) <- mp
bmodel <- posteriorSimulation(bmodel)
batchy <- posteriorPredictive(bmodel)
## End(Not run)