Hi,

I'm trying to fit a mixture of a gamma and negative binomial distribution to a data set in R. In the end the idea is to get the parameters of the two fitted distributions as well as a likelihood; something like this but, as far as I can tell, this package only does mixtures of the same type of distributions (two normal, two poisson, etc..)

I've looked arround and the R package that looks more promising is flexmix but I cannot get it to work. I've been trying with simpler examples (gaussian and poisson) but no good. So far this is what I've got:

```
ex1 <- stepFlexmix(y~x,
data=data, k=2:5,
model=list(FLXMRglm(.~., family="gaussian"),
FLXMRglm(.~., family="poisson")),
control=list(verb=5, iter=100))
```

Anyone has any idea on how to get it?

Thanks in advance,

FGV

(may be irrelevant, but out of curiosity) why do you fit with gamma and negative binomial? Negative binomial could already be obtained by modeling $\lambda$ parameter of poisson distribution as a random variable that is gamma distributed. http://en.wikipedia.org/wiki/Negative_binomial_distribution#Gamma.E2.80.93Poisson_mixture

I'm analyzing some data that is supposed to be a mixture of two different processes: one has been described as following a negative binomial but the other is a bit more obscure (so I'am trying the gamma). My objective is to try to disentangle both effects.

I know that a neg binomial can be obtained by a poisson and a gamma but am not entirely sure how that can help...

Is this read depth data?

Yes, the data are NGS read depth

Yes indeed, you're right. It has nothing to do with your question :). I was thinking more in the line of Zev. Reads from RNA-seq data is usually modeled as a NB distribution as well. I thought you had it gamma and NB confused. Sorry about that.

respected sir

I am working on the mixture of burr XII and weibull dstributions. I have to estimate the parameters through R language. can you kindly guide me how I will do it in R. thanx