testTn: Pgf Test for Poisson Distribution Tn

Description Usage Arguments Details Value Author(s) References Examples

View source: R/TESTTN.R

Description

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

Usage

1
testTn(x, n.boot)

Arguments

x

vector of nonnegative integers, the sample data.

n.boot

number of bootstrap replicates.

Details

The pgf test of Poissonity Tn was proposed by Baringhaus and Henze (1992). 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.

T_{n} = \int_{0}^{1} [\bar{X}_{n} g_{n}(s) - g`_{n}(s)]^2 ds

g_{n}(s) denotes pgf of X.

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

Value

The function testTn 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

Baringhaus, L., Henze, N. (1992) A goodness of fit test for the Poisson distribution based on the empirical generating function Statist. Probab. Lett. Vol 13, 269-274 https://ideas.repec.org/a/eee/stapro/v13y1992i4p269-274.html

Examples

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

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