rPosteriorPredictive.CatHDP: Generate random samples from the posterior predictive...

Description Usage Arguments Value References See Also

View source: R/Dirichlet_Process.r


Generate random samples from the posterior predictive distribution of the following structure:

G|gamma \sim DP(gamma,U)

pi_j|G,alpha \sim DP(alpha,G), j = 1:J

z|pi_j \sim Categorical(pi_j)

k|z,G \sim Categorical(G), \textrm{ if z is a sample from the base measure G}

where DP(gamma,U) is a Dirichlet Process on positive integers, gamma is the "concentration parameter", U is the "base measure" of this Dirichlet process, U is an uniform distribution on all positive integers. DP(alpha,G) is a Dirichlet Process on integers with concentration parameter alpha and base measure G. Categorical() is the Categorical distribution. See dCategorical for the definition of the Categorical distribution.
In the case of CatHDP, z and k can only be positive integers.
The model structure and prior parameters are stored in a "CatHDP" object.
Posterior predictive is a distribution of z,k|alpha,gamma,U.


## S3 method for class 'CatHDP'
rPosteriorPredictive(obj, n = 1L, j, ...)



A "CatHDP" object.


integer, number of samples.


integer, group label.


Additional arguments to be passed to other inherited types.


integer, the categorical samples.


Teh, Yee W., et al. "Sharing clusters among related groups: Hierarchical Dirichlet processes." Advances in neural information processing systems. 2005.

See Also

CatHDP, dPosteriorPredictive.CatHDP

bbricks documentation built on July 8, 2020, 7:29 p.m.