sample.test {PEkit}R Documentation

Lagrange Multiplier Test for \psi

Description

Performs the Lagrange Multiplier test for the equality of the dispersion parameter \psi of a sample. The null hypothesis of the test is H_0: \psi = \psi_0, where \psi_0 is given as input here.

Usage

sample.test(abund, psi = "a")

Arguments

abund

An abundance vector of a sample.

psi

Target positive number \psi_0 to be tested. Accepted values are "a" for absolute value 1, "r" for relative value n (sample size), or any positive number.

Details

Calculates the Lagrange Multiplier test statistic

S\, = \,U(\psi_0)^2 / I(\psi_0),

where U is the log-likelihood function of \psi and I is its Fisher information. The statistic S follows \chi^2-distribution with 1 degree of freedom when the null hypothesis H_0:\psi=\psi_0 is true.

Value

The statistic S and a p-value of the two-sided test of the hypothesis.

References

Radhakrishna Rao, C, (1948), Large sample tests of statistical hypotheses concerning several parameters with applications to problems of estimation. Mathematical Proceedings of the Cambridge Philosophical Society, 44(1), 50-57. <doi: 10.1017/S0305004100023987>

Examples

## Test the psi of a sample from the Poisson-Dirichlet distribution:
set.seed(10000)
x<-rPD(1000, 10)
## Find the abundance of the data vector:
abund=abundance(x)
## Test for the psi that was used, as well as a higher and a lower one:
sample.test(abund, 10)
sample.test(abund, 15)
sample.test(abund, 5)
sample.test(abund)       #test for psi=1
sample.test(abund, "r")  #test for psi=n

[Package PEkit version 1.0.0.1000 Index]