dAllIndicators.HDP: Get the probabilities of all possible values of the hidden...

Description Usage Arguments Value

View source: R/Dirichlet_Process.r

Description

Get p(z,k|gamma,alpha,psi,j,x), or p(z,k|gamma,alpha,psi,j) for the model 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}

theta_k|psi \sim H0(psi)

x|theta_k,k \sim F(theta_k)

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. The choice of F() and H0() can be described by an arbitrary "BasicBayesian" object such as "GaussianGaussian","GaussianInvWishart","GaussianNIW", "GaussianNIG", "CatDirichlet", and "CatDP". See ?BasicBayesian for definition of "BasicBayesian" objects, and see for example ?GaussianGaussian for specific "BasicBayesian" instances. As a summary, An "HDP" object is simply a combination of a "CatHDP" object (see ?CatHDP) and an object of any "BasicBayesian" type.
In the case of HDP, z and k can only be positive integers.
This function will return all possible values of z, k and their corresponding probabilities

Usage

1
2
## S3 method for class 'HDP'
dAllIndicators(obj, j, x = NULL, ...)

Arguments

obj

A "HDP" object.

j

integer, the group ID.

x

the observation. The data type of x must fit the observation distribution specified by "H0aF" when initiating the "HDP" object.

...

further arguments passed to or from other methods.

Value

a data.frame of three columns, the first two columns are all possible values of z and k, the third column is the corresponding probabilities.


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