Description Usage Arguments Value References See Also
View source: R/Dirichlet_Process.r
Generate the the density value of the posterior predictive distribution of the following structure:
G |eta \sim DP(eta,U)
G_m|gamma \sim DP(gamma,G), m = 1:M
pi_{mj}|G_m,alpha \sim DP(alpha,G_m), j = 1:J_m
z|pi_{mj} \sim Categorical(pi_{mj})
k|z,G_m \sim Categorical(G_m), \textrm{ if z is a sample from the base measure }G_m
u|k,G \sim Categorical(G), \textrm{ if k is a sample from the base measure G}
where DP(eta,U) is a Dirichlet Process on positive integers, eta is the "concentration parameter", U is the "base measure" of this Dirichlet process, U is an uniform distribution on all positive integers. DP(gamma,G) is a Dirichlet Process on integers with concentration parameter gamma and base measure G. DP(alpha,G_m) is a Dirichlet Process on integers with concentration parameter alpha and base measure G_m. Categorical() is the Categorical distribution. See dCategorical
for the definition of the Categorical distribution.
In the case of CatHDP2, u, z and k can only be positive integers.
The model structure and prior parameters are stored in a "CatHDP" object.
Posterior predictive density = p(u,z,k|alpha,gamm,eta,U).
1 2 | ## S3 method for class 'CatHDP2'
dPosteriorPredictive(obj, u, k, z, m, j, LOG = TRUE, ...)
|
obj |
A "CatHDP" object. |
u |
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. |
z |
integer, the elements of the vector must all greater than 0, the samples of a Categorical distribution. |
m |
integer, group label. |
j |
integer, subgroup 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.