rPosteriorPredictive.CatDP: Posterior predictive random generation of a "CatDP" object
Description
Generate random samples from the posterior predictive distribution of the following structure:
pi|alpha ~ DP(alpha,U)
x|pi ~ Categorical(pi)
where DP(alpha,U) is a Dirichlet Process on positive integers, alpha is the "concentration parameter" of the Dirichlet Process, U is the "base measure" of this Dirichlet process, it is an uniform distribution on all positive integers.
In the case of CatDP, x can only be positive integers.
The model structure and prior parameters are stored in a "CatDP" object.
Posterior predictive is a distribution of x|alpha.
Usage
# S3 method for CatDP
rPosteriorPredictive(obj, n = 1L, ...)
Arguments
obj
A "CatDP" object.
n
integer, number of samples.
...
Additional arguments to be passed to other inherited types.
Value
integer, the categorical samples.
References
Teh, Yee W., et al. "Sharing clusters among related groups: Hierarchical Dirichlet processes." Advances in neural information processing systems. 2005.