Dear list, I have been comparing the outputs of two packages for latent class regression, namely 'flexmix', and 'mmlcr'. What I have noticed is that the flexmix package appears to come up with a much better fit than the mmlcr package (based on logLik, AIC, BIC, and visual inspection). Has anyone else observed such behaviour? Has anyone else been successful in using the mmlcr package? I ask because I am interested in latent class negative binomial regression, which the mmlcr package appears to support, however, the results for basic Poisson latent class regression appear to be inferior to the results from flexmix. Below is a simple reproducible example to illustrate the comparison:
library(flexmix) library(mmlcr) data(NPreg) # from package flexmix m1 <- flexmix(yp ~ x, k=2, data=NPreg, model=FLXMRglm(family='poisson')) NPreg$id <- 1:200 # mmlcr requires an id column m2 <- mmlcr(outer=~1|id, components=list(list(formula=yp~x, class="poisonce")), data=NPreg, n.groups=2) # summary and coefficients for flexmix model summary(m1) summary(refit(m1)) # summary and coefficients for mmlcr model summary(m2) m2 Regards, Carson P.S. I have attached a copy of the mmlcr package with a modified mmlcr.poisonce function due to errors in the version available here: http://cran.r-project.org/src/contrib/Archive/mmlcr/. See also http://jeldi.com/Members/jthacher/tips-and-tricks/programs/r/mmlcr section "Bugs?" subsection "Poisson". -- Carson J. Q. Farmer ISSP Doctoral Fellow National Centre for Geocomputation National University of Ireland, Maynooth, http://www.carsonfarmer.com/
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.