View source: R/poisdisp.test.R
Tests for the dispersion parameter in Poisson distribution | R Documentation |
Tests for the dispersion parameter in Poisson distribution.
poisdisp.test(y, alternative = "either", logged = FALSE)
pois.test(y, logged = FALSE)
y |
A numerical vector with count data, 0, 1,... |
alternative |
Do you want to test specifically for either over or underspirsion ("either"), overdispersion ("over") or undersispersion ("under")? |
logged |
Set to TRUE if you want the logarithm of the p-value. |
A vector with two elements, the test statistic and the (logged) p-value.
Michail Tsagris
R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr> and Manos Papadakis <papadakm95@gmail.com>.
Yang Zhao, James W. Hardin, and Cheryl L. Addy. (2009). A score test for overdispersion in Poisson regression based on the generalized Poisson-2 model. Journal of statistical planning and inference 139(4): 1514-1521.
Dimitris Karlis and Evdokia Xekalaki (2000). A Simulation Comparison of Several Procedures for Testing the Poisson Assumption. Journal of the Royal Statistical Society. Series D (The Statistician), 49(3): 355-382.
Bohning, D., Dietz, E., Schaub, R., Schlattmann, P. and Lindsay, B. (1994) The distribution of the likelihood ratio for mixtures of densities from the one-parameter exponential family. Annals of the Institute of Statistical Mathematics, 46(): 373-388.
poisson.mle, negbin.mle, poisson.anova, poisson.anovas, poisson_only
y <- rnbinom(500, 10, 0.6)
res<-poisdisp.test(y, "either")
res<-poisdisp.test(y, "over")
res<-pois.test(y)
y <- rpois(500, 10)
res<-poisdisp.test(y, "either")
res<-poisdisp.test(y, "over")
res<-pois.test(y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.