Generate the marginal likelihood of the following model structure: pi|alpha ~ DP(alpha,U) x|pi ~ Categorical(pi) 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, it is an uniform distribution on all positive integers. In the case of CatDP, x can only be positive integers. The model structure and prior parameters are stored in a "CatDP" object. Marginal likelihood is the likelihood of x|alpha.
# S3 method for CatDP
marginalLikelihood(obj, x, LOG = TRUE, ...)
A "CatDP" object.
integer, the elements of the vector must all greater than 0, the samples of a Categorical distribution.
Return the log density if set to "TRUE".
Additional arguments to be passed to other inherited types.
numeric, the marginal likelihood.
@seealso CatDP
, marginalLikelihood_bySufficientStatistics.CatDP