mix(Z, alpha, g0params, times=NULL, rho=NULL, cat=0, state=NULL, read=FALSE, print=FALSE, N=100, niter=0)
data.frame
of observations, with the last cat
columns categorical variables. times = NULL
). particle()
function.Output to R is minimal. The object returned by function mix()
is mostly just a list of input variables, except forThis is a bare-bones implementation of sampling algorithms for Bayesian stick-breaking mixture models. The software is designed to be easy to customize to suit different situations and for experimentation with stick-breaking models. Since particles are repeatedly copied, it is not especially efficient.
The package implements particle learning (Carvalho et al, 2009) for both dynamic and constant stick-breaking mixture models, and collapsed Gibbs sampling for DP mixtures. Conditional sufficient statistics for each mixture component are output as particle files.
Mixture kernels are the product of independent multinomial densities for each categorical variable, and a multivariate normal density for continuous covariates. The base measure is conditionally conjugate normal-Wishart-Dirichlet product, with Wishart hyperprior for inverse base covariance. Beta-autoregressive stick-breaking is used to model correlated densities.
Refer to Taddy (2009) for all specification details. See DPreg demo for regression with categorical and continuous covariates, with additional Gibbs sampling for filtered particles.
See bar1D and bar2D demos for dynamic stick-breaking mixture density estimation, Bayes factor calculations, and comparison between correlated and independent model fit.
An auto-regressive mixture model for dynamic spatial Poisson processes: Application to tracking the intensity of violent crime (Taddy 2009),
Particle learning for general mixtures (Carvalho, Lopes, Polson, and Taddy 2009),
A Bayesian nonparametric approach to inference for quantile regression (Taddy and Kottas 2009).
and other papers at faculty.chicagobooth.edu/matt.taddy/research.
particle