mvnpEM | R Documentation |
An extension of the original npEM
algorithm, for mixtures
of multivariate data where the coordinates of a row (case)
in the data matrix are assumed to be made of independent but multivariate blocks (instead of just coordinates),
conditional on the mixture
component (subpopulation) from which they are drawn (Chauveau and Hoang 2015).
mvnpEM(x, mu0, blockid = 1:ncol(x), samebw = TRUE, bwdefault = apply(x,2,bw.nrd0), init = NULL, eps = 1e-8, maxiter = 500, verb = TRUE)
x |
An n x r matrix of data. Each of the n rows is a case, and each case has r repeated measurements. These measurements are assumed to be conditionally independent, conditional on the mixture component (subpopulation) from which the case is drawn. |
mu0 |
Either an m x r matrix specifying the initial centers for the kmeans function, or an integer m specifying the number of initial centers, which are then chosen randomly in kmeans |
blockid |
A vector of length r identifying coordinates
(columns of |
samebw |
Logical: If |
bwdefault |
Bandwidth default for density estimation,a simplistic application of the
default |
init |
Initialization method, based on an initial n x m
matrix for the posterior probabilities. If |
eps |
Tolerance limit for declaring algorithm convergence. Convergence
is declared whenever the maximum change in any coordinate of the
|
maxiter |
The maximum number of iterations allowed; convergence
may be declared before |
verb |
Verbose mode; if TRUE, print updates for every iteration of the algorithm as it runs |
mvnpEM
returns a list of class mvnpEM
with the following items:
data |
The raw data (an n x r matrix). |
posteriors |
An n x m matrix of posterior probabilities for each observation (row). |
lambda |
The sequence of mixing proportions over iterations. |
blockid |
The |
samebw |
The |
bandwidth |
The final bandwidth matrix
after convergence of the algorithm.
Its shape depends on the |
lambdahat |
The final mixing proportions. |
loglik |
The sequence of pseudo log-likelihood values over iterations. |
Benaglia, T., Chauveau, D., and Hunter, D. R. (2009), An EM-like algorithm for semi- and non-parametric estimation in multivariate mixtures, Journal of Computational and Graphical Statistics, 18, 505-526.
Benaglia, T., Chauveau, D. and Hunter, D.R. (2011), Bandwidth Selection in an EM-like algorithm for nonparametric multivariate mixtures. Nonparametric Statistics and Mixture Models: A Festschrift in Honor of Thomas P. Hettmansperger. World Scientific Publishing Co., pages 15-27.
Chauveau, D., and Hoang, V. T. L. (2015), Nonparametric mixture models with conditionally independent multivariate component densities, Preprint under revision. https://hal.archives-ouvertes.fr/hal-01094837
plot.mvnpEM
, npEM
# Example as in Chauveau and Hoang (2015) with 6 coordinates ## Not run: m=2; r=6; blockid <-c(1,1,2,2,3,3) # 3 bivariate blocks # generate some data x ... a <- mvnpEM(x, mu0=2, blockid, samebw=F) # adaptive bandwidth plot(a) # this S3 method produces 6 plots of univariate marginals summary(a) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.