gofTest(counts, a = 0, mc.cores = 1)
mc.cores=1
is not changed,
all available cores will be used.
testShapePT
.
A.H. El-Shaarawi, R. Zhu, H. Joe (2010). Modelling species abundance using the Poisson-Tweedie family. Environmetrics 22, pages 152-164. P. Hougaard, M.L. Ting Lee, and G.A. Whitmore (1997). Analysis of overdispersed count data by mixtures of poisson variables and poisson processes. Biometrics 53, pages 1225-1238.
testShapePT
## Generate a random matrix of counts
counts <- matrix(rPT(n=2000, a=0.5, mu=10, D=5), nrow=20)
## Perform the goodness-of-fit tests for every row in the matrix
chi2gof <- gofTest(counts)
## Calculate and sort the corresponding P-values for the
## null hypothesis that counts follow a negative binomial distribution
sort(pchisq(chi2gof, df=1, lower.tail=FALSE))
Run the code above in your browser using DataLab