testLn: Edf Test for Poisson Distribution Ln

Description Usage Arguments Details Value Author(s) References Examples

View source: R/TESTLN.R

Description

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

Usage

1
testLn(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 Klar (2000). The test is based on the similarity between the edf of the random variable X, F_{n}(k), and the cdf of a Poisson distribution with parameter λ = \hat{X}, F(k,\hat{λ}_{n}). The test statistic is created working in the l1 space of all sequences satisfying ∑{k ≥ 0} |X_{k}| < ∞.

L_{n} = ∑_{k ≥ 0} √{n} |F_{n}(k) - F(k,\hat{λ}_{n})|

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

Value

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

Klar, B. (2000) Goodness-of-fit tests for discrete models based on the integrated distribution function, Metrika Vol 49, 53-69 https://link.springer.com/article/10.1007/s001840050025

Examples

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

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