rMultiMix: rMultiMix

Description Usage Arguments

Description

Draw from finite or infinite (Dirichlet process) multivariate normal mixture model. Note that although correlations are allowed for each mixture component, the locations of components are drawn from a multivariate normal distribution with standard deviation tau in all directions (i.e. no correlation). Allows for generation of missing data by randomly eliminating a proportion of results.

Usage

1
rMultiMix(n, K, psi, nu, alpha, tau, pMissing = 0)

Arguments

n

number of draws.

K

number of mixture components. Set K=Inf to use infinite mixture model.

psi

prior matrix for inverse Wishart prior on covariance. When psi is a scalar value the model is one-dimensional, and variances are effectively drawn from an inverse-gamma distribution with shape alpha=nu/2 and rate beta=psi/2.

nu

degrees of freedom for inverse Wishart prior on covariance.

alpha

Dirichlet prior parameter for mixture weights. Set alpha=Inf to use model of equal weights.

tau

standard deviation of prior on individual components means (this prior is centred at 0).

pMissing

proportion of data that is missing.


bobverity/bobFunctions documentation built on May 12, 2019, 11:29 p.m.