I have some data that describe gene expression of several people.
I want to understand whether the distribution of the data can be modeled as the Poisson or the Negative binomial distribution.
For the Poisson I use the next commands:
n <- length(x) lambda = mean(x) # I use the MLE for the Poisson parameter f.hyp = dpois(x,lambda)*n chiSquare.pois = sum((f.obs-f.hyp)^2/f.hyp)
Am I right with this code ?
How can I estimate the parameters for the neg.binomial distribution and compare these two models (poisson and neg.binomial ) ?