
## S3 method for class 'flexmix':
refit(object, model=1, ...)
"flexmix"
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.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)
Run the code above in your browser using DataLab