posteriorPredictive: Simulate data from the posterior predictive distribution

Description Usage Arguments Examples

Description

Simulating from the posterior predictive distribution can be helpful for assessing the adequacy of the mixture model.

Usage

1

Arguments

model

a SingleBatchModel or MultiBatchModel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
   model <- SingleBatchModelExample
   mp <- McmcParams(iter=200, burnin=50)
   mcmcParams(model) <- mp
   model <- posteriorSimulation(model)
   pd <- posteriorPredictive(model)
   if(FALSE) qqplot(pd, y(model))

   bmodel <- MultiBatchModelExample
   mp <- McmcParams(iter=500, burnin=150, nStarts=20)
   mcmcParams(bmodel) <- mp
   bmodel <- posteriorSimulation(bmodel)
   batchy <- posteriorPredictive(bmodel)

## End(Not run)

CNPBayes documentation built on May 6, 2019, 4:06 a.m.