Learn R Programming

cwm (version 0.0.3)

stepCwr: Function to estimate CWR models via multiple EM algorithm restarts

Description

This function iteratens nIter times a single estimation of CWR models by cwrEm function. Then the one that has best logLikelihood is chosen.

Usage

stepCwr(X, Y, nc, prop = 0.1, nIter = 10, changeTrainingSet = FALSE)

Arguments

X
X data vector
Y
Y data vector
nc
number of clusters.
prop
Proportion of samples. Default 0.1.
nIter
Number of iteration. Default 10.
changeTrainingSet
Boolean. If TRUE the training set is changed.

Value

A cwr object.

Details

This function allows the estimation of models where the structure of the data set lies to probable convergence problems.

References

Murphy, Bettina.

See Also

cwrEm

Examples

Run this code
data(geyser)
x=geyser[,1]
y=geyser[,2]                            
ciao=stepCwr(x,y,nc=2)

Run the code above in your browser using DataLab