testRn: Pgf Test for Poisson Distribution Rn

Description Usage Arguments Details Value Author(s) References Examples

View source: R/TESTRN.R

Description

Performs the probability-generating function goodness-of-fit test of Poisson distribution with unknown parameter.

Usage

1
testRn(x, n.boot)

Arguments

x

vector of nonnegative integers, the sample data.

n.boot

number of bootstrap replicates.

Details

The pgf test of Poissonity Rn was proposed by Rueda et al (1991). The test is based on the similarity between the empirical probability-generating function of the random variable X and the pgf of a Poisson distribution with parameter mean of X. The test statistic is a square similarity measure.

R_{n} = \int_{0}^{1} G^2_{n}(s) ds

G_{n}(s) denotes G_{n}(s) = √{n} (g_{n}(s) - g(s;\hat{λ}_{n}))

g_{n}(u) denotes pgf of X

g(u,\hat{λ}) denotes generating function of Poisson distribution with parameter λ = \hat{X}, F(k,\hat{λ}_{n}).

The test is implemented by parametric boostrap with n.boot replicates.

Value

The function testRn returns a list with class htest containing:

Description of test.

data

Description of data.

test statistic

Value of test statistic.

p-value

approximate p-value of the test.

mean

sample mean.

Author(s)

Manuel Mendez Hurtado mmendezinformatica@gmail.com

References

Rueda, R., Perez-Abreu, v., O'Reilly, F. (1991) Goodness of fit for the poisson distribution based on the probability generating function Commun. Statist. - Theory Mehods Vol 20 (10), 3093-3110 https://www.tandfonline.com/doi/abs/10.1080/03610929108830690

Examples

1
2
x <- rpois(20,2)
testRn(x, n.boot = 500)

MMH1997/TestPoissonity documentation built on Dec. 17, 2021, 2:11 a.m.