rflexmix: Random number generator for finite mixtures
Description
Given a finite mixture model generate random
numbers from it.
Usage
rflexmix(object, newdata, ...)
Arguments
object
A fitted finite mixture model of class flexmix
or an unfitted of class FLXdist.
newdata
Optionally, a data frame in which to look for variables with
which to predict or an integer specifying the number of random draws
for model-based clustering. If omitted, the data to which the model
was fitted is used.
...
Further arguments to be passed to or from methods.
Value
A list with components
yRandom sample
groupGrouping factor
classClass membership
Details
rflexmix provides the creation of the model matrix for new data
and the sampling of the cluster memberships. The sampling of the
component distributions given the classification is done by calling
rFLXM. This step has to be provided for the different model
classes.