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