Re: [R] Three-component Negative Binomial Mixture: R code

2016-11-10 Thread danilo . carita
Thank you for your hints, now the goodness of fit test provides me good results, but surprisingly for me the three-component model turns out to be worse than the two-component one (indeed, I focused on the three-component mixture because the two-component one exhibits a low p-value). In

Re: [R] Three-component Negative Binomial Mixture: R code

2016-11-08 Thread danilo . carita
I tried the function flexmix() with the driver FLXMRnegbin() with two components first, in order to compare its results with those provided by my function mixnbinom(). In particular, I ran the following code: fm0 <- flexmix(y ~ 1, data = data.frame(y), k = 2, model = FLXMRnegbin())

[R] Three-component Negative Binomial Mixture: R code

2016-11-07 Thread danilo . carita
I need a function for R software which computes a mixture of Negative Binomial distributions with at least three components. I found on another site the following function "mixnbinom". It works very well, but it computes a mixture of only two components: