refit {flexmix}R Documentation

Refit a Fitted Model

Description

Refits an estimated flexmix model to obtain additional information like coefficient significance p-values for GLM regression.

Usage

## S4 method for signature 'flexmix':
refit(object, model=1, ...)

Arguments

object an object of class "flexmix"
model The model (for a multivariate response) that shall be refitted.
... currently not used

Details

Currently there is only a refit method for FLXglm models, which in combination with the summary method can be used to obtain the usual tests for significance of coefficients. Note that the tests are valid only if flexmix returned the maximum likelihood estimator of the parameters.

Author(s)

Friedrich Leisch

References

Friedrich Leisch. FlexMix: A general framework for finite mixture models and latent class regression in R. Journal of Statistical Software, 11(8), 2004. http://www.jstatsoft.org/v11/i08/

Examples

data(NPreg)
ex1 <- flexmix(yn~x+I(x^2), data=NPreg, k=2)
ex1r <- refit(ex1)

## in one component all coefficients should be highly significant,
## in the other component only the linear term
summary(ex1r)

[Package flexmix version 1.1-0 Index]