testRna: Pgf Test for Poisson Distribution Rn

Description Usage Arguments Details Value Author(s) References Examples

View source: R/TESTRN_A.R

Description

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

Usage

1
testRna(x, a, n.boot)

Arguments

x

vector of nonnegative integers, the sample data.

n.boot

number of bootstrap replicates.

a

weight value

Details

The pgf test of Poissonity Rna was proposed by Baringhaus et al (2000). 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 weighted Cramer-von-Mises distance.

R_{n,a} = \int_{0}^{1} G^2_{n}(s) s^a 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 testRna 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., Gurtel, N., Henze, N. (2000) Weighted Integral Test Statistics and Components of Smooth Tests of Fit Austral. New Zeal. J. Statist https://doi.org/10.1111/1467-842X.00117

Examples

1
2
x <- rpois(20,2)
testRna(x, a = 3, n.boot = 500)

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