Automatically set starting values for an OpenMx mixture model. This function
was designed to work with mixture models created using
mx_mixture, and may not work with other
mixture_starts(model, splits, ...)
A mixture model of class
Optional. A numeric vector of length equal to the number of
rows in the
mxData used in the
model object. The data
will be split by this vector. See Details for the default setting and
Additional arguments, passed to functions.
mxModel with starting values.
Starting values are derived by the following procedure:
The mixture model is converted to a multi-group model.
The data are split along
splits, and assigned to the
corresponding groups of the multi-group model.
The multi-group model is run, and the final values of each group are assigned to the corresponding mixture component as starting values.
The mixture model is returned with these starting values.
If the argument
splits is not provided, the function will call
(x = data, centers = classes)$cluster,
data is extracted from the
Sensible ways to split the data include:
Using Hierarchical clustering:
cutree(hclust(dist(data)), k = classes))
Using K-means clustering:
(x = data, centers = classes)$cluster
Using agglomerative hierarchical clustering:
(data = data), G = classes)[, 1]
Using a random split:
(n = classes,
size = nrow(data), replace = TRUE)
Shireman, E., Steinley, D. & Brusco, M.J. Examining the effect of initialization strategies on the performance of Gaussian mixture modeling. Behav Res 49, 282–293 (2017). <doi:10.3758/s13428-015-0697-6>