Learn R Programming

bbricks (version 0.1.1)

sufficientStatistics_Weighted.DP: Weighted sufficient statistics of a "DP" object

Description

For following model structure: Create an object of type "DP", which represents the Dirichlet-Process model structure: pi|alpha ~ DP(alpha,U) z|pi ~ Categorical(pi) theta_z|psi ~ H0(psi) x|theta_z,z ~ 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 arbitrary, they are distributions of x and theta_z correspondingly. The sufficient statistics of a set of samples x in a "DP" object is the same sufficient statistics of the "BasicBayesian" inside the "DP", see examples.

Usage

# S3 method for DP
sufficientStatistics_Weighted(obj, x, w, ...)

Arguments

obj

A "DP" object.

x

Random samples of the "BasicBayesian" object.

w

numeric, sample weights.

...

Additional arguments to be passed to other inherited types.

Value

Return the sufficient statistics of the corresponding BasicBayesian type, see examples.

References

Teh, Yee W., et al. "Sharing clusters among related groups: Hierarchical Dirichlet processes." Advances in neural information processing systems. 2005.

See Also

DP, sufficientStatistics.DP