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 H0:ψ=ψ0H_0: \psi = \psi_0, where ψ0\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 ψ0\psi_0 to be tested. Accepted values are "a" for absolute value 1, "r" for relative value nn (sample size), or any positive number.

Details

Calculates the Lagrange Multiplier test statistic

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

where UU is the log-likelihood function of ψ\psi and II is its Fisher information. The statistic SS follows χ2\chi^2-distribution with 1 degree of freedom when the null hypothesis H0:ψ=ψ0H_0:\psi=\psi_0 is true.

Value

The statistic SS 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]