For the model structure:
$$pi|alpha \sim DP(alpha,U)$$
$$z|pi \sim Categorical(pi)$$
$$theta_z|psi \sim H0(psi)$$
$$x|theta_z,z \sim F(theta_z)$$
where DP(alpha,U) is a Dirichlet Process on positive integers, alpha is the "concentration parameter" of the Dirichlet Process, U is the "base measure" of this Dirichlet process. 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 "DP" object is simply a combination of a "CatDP" object (see ?CatDP
) and an object of any "BasicBayesian" type.
Contrary to posterior(), this function will update the prior knowledge by removing the information of observed samples x. The model structure and prior parameters are stored in a "CatDP" object, the prior parameters in this object will be updated after running this function.