dPosteriorPredictive.CatHDP {bbricks} | R Documentation |
Generate the the density value of 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 density = p(z,k|alpha,gamma,U,j)
## S3 method for class 'CatHDP' dPosteriorPredictive(obj, z, k, j, LOG = TRUE, ...)
obj |
A "CatHDP" object. |
z |
integer, the elements of the vector must all greater than 0, the samples of a Categorical distribution. |
k |
integer, the elements of the vector must all greater than 0, the samples of a Categorical distribution. |
j |
integer, group label. |
LOG |
Return the log density if set to "TRUE". |
... |
Additional arguments to be passed to other inherited types. |
A numeric vector, the posterior predictive density.
Teh, Yee W., et al. "Sharing clusters among related groups: Hierarchical Dirichlet processes." Advances in neural information processing systems. 2005.
CatHDP
, dPosteriorPredictive.CatHDP