Generate the the density value of the posterior predictive distribution of the following structure: G_j|gamma ~ DP(gamma,U), j = 1:J pi_j|G_j,alpha ~ DP(alpha,G_j) z|pi_j ~ Categorical(pi_j) k|z,G_j ~ Categorical(G_j), if z is a sample from the base measure G where DP(gamma,U) is a Dirichlet Process on integers, gamma is the concentration parameter of the Dirichlet Process. DP(gamma,G_j) is a Dirichlet Process on integers with concentration parameter alpha and base measure G_j. 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,gamm,U,G_j.
# S3 method for CatHDP
dPosteriorPredictive(obj, z, k, j, LOG = TRUE, ...)A "CatHDP" object.
integer, the elements of the vector must all greater than 0, the samples of a Categorical distribution.
integer, the elements of the vector must all greater than 0, the samples of a Categorical distribution.
integer, group label.
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.
@seealso CatHDP, dPosteriorPredictive.CatHDP