Description Usage Arguments Details Value Author(s) References See Also Examples
Fit a mixture of regressions model, one EM step at a time, plotting the result after each step.
1 2 3 |
fmla |
The formula specifying the regression in the mixture model that is to be fitted. |
ncomp |
Integer scalar; the number of components in the model. Defaults to 2. |
eqVar |
See |
thetaStart |
See |
nsteps |
Integer scalar; the maximum number of EM steps to be undertaken. |
eps |
See |
digits |
The number of digits to which the details about the EM steps are printed out. |
maxTry |
See |
seed |
See |
data |
A data frame containing the variables to which the model is to be fitted. |
Can only be used in an interactive session. May give some insight into convergence problems or into the reasons for unexpected results in the fit.
An object of class "mixreg"
. See mixreg()
.
The model being fitted may not have converged.
Rolf Turner r.turner@auckland.ac.nz
See mixreg()
.
1 2 3 4 5 6 7 8 | ## Not run: # Interactive session is required.
vfit <- visualFit(y~x,data=kilnAfull,ncomp=3)
stepPlot(y ~ x,ncomp=3,data=kilnAfull,thetaStart=vfit$theta)
## End(Not run)
# The result is clearly slightly wrong in respect of the second ("middle")
# component, which has a slope that is too low. The outlier in
# kilnAfull may be "pulling up" the left hand end of the fitted line.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.