dPosteriorPredictive.CatHDP: Posterior predictive density function of a "CatHDP" object

Description Usage Arguments Value References See Also

View source: R/Dirichlet_Process.r

Description

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)

Usage

1
2
## S3 method for class 'CatHDP'
dPosteriorPredictive(obj, z, k, j, LOG = TRUE, ...)

Arguments

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.

Value

A numeric vector, the posterior predictive density.

References

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.