rPosteriorPredictive.CatDirichlet: Generate random samples from the posterior predictive distribution of a "CatDirichlet" object
Description
Generate random samples from the posterior predictive distribution of the following structure:
$$pi|alpha \sim Dir(alpha)$$
$$x|pi \sim Categorical(pi)$$
Where Dir() is the Dirichlet distribution, Categorical() is the Categorical distribution. See ?dDir and dCategorical for the definitions of these distribution.
The model structure and prior parameters are stored in a "CatDirichlet" object
posterior predictive is a distribution of x|alpha
Usage
# S3 method for CatDirichlet
rPosteriorPredictive(obj, n, ...)
Arguments
obj
A "CatDirichlet" object.
n
integer, number of samples.
...
Additional arguments to be passed to other inherited types.
Value
A vector of the same type as obj$gamma$uniqueLabels.
References
Murphy, Kevin P. Machine learning: a probabilistic perspective. MIT press, 2012.