refit {flexmix} | R Documentation |
Refits an estimated flexmix model to obtain additional information like coefficient significance p-values for GLM regression.
## S4 method for signature 'flexmix': refit(object, model=1, ...)
object |
an object of class "flexmix" |
model |
The model (for a multivariate response) that shall be refitted. |
... |
currently not used |
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.
Friedrich Leisch
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/
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)