testCn_: Edf Test for Poisson Distribution Cn*

Description Usage Arguments Details Value Author(s) References Examples

View source: R/TESTCN_.R

Description

Performs the empirical distribution function goodness-of-fit test of Poisson distribution with unknown parameter

Usage

1
testCn_(x, n.boot)

Arguments

x

vector of nonnegative integers, the sample data

n.boot

number of bootstrap replicates

Details

The edf test of Poissonity Cn* was proposed by Henze (1996). The test is based on the similarity between the edf of the random variable X, F_{n}(k), and the cdf of Poisson distribution with parameter λ = \hat{X}, F(k,\hat{λ}_{n}). The test statistic is a modification of the Cramer-von-Mises type of distance.

C_{n}^\star = n ∑_{k = 0}^{∞} [F_{n}(k) - F(k;\hat{λ}_{n})]^2 f_{n}(k)

f_{n}(k) denotes F_{n}(k) - F_{n}(k-1). The test is implemented by parametric boostrap with n.boot replicates

Value

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

Henze, N. (1996) Empirical-distribution-function goodness-of-fit tests for discrete models, The Canadian Journal of Statistics Vol 24 No 1, 81-93 https://www.jstor.org/stable/3315691?seq=1

Examples

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

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