# Generate a random matrix of counts
counts <- rPT(n=1000, a=0.5, mu=10, D=5)
# Maximum likelihood estimation of the Poisson-Tweedie parameters
mleEstimate <- mlePoissonTweedie(x = counts, a.ini = 0, D.ini
= 10)
# Test whether data comes from Negative-Binomial distribution
testShapePT(mleEstimate)
# Test whether data comes from Poisson-inverse Gaussian
testShapePT(mleEstimate, a = 0.5)
Run the code above in your browser using DataLab