LMTp: Lagrange Multiplier Test for psi

Description Usage Arguments Details Value References Examples

View source: R/Parameter_estimation_and_hypothesis_testing.R

Description

Performs the Lagrange Multiplier test for an abundance vector under partition exchangeability. Returns a p-value for the hypothesis that the input data vector stems from a population with the input dispersal parameter.

Usage

1
LMTp(abund, psi = "a")

Arguments

abund

An abundance vector.

psi

Target ψ to be tested. psi = "a" for absolute value 1, "r" for relative value n (sample size), or any positive number.

Details

U(ψ_0)^2 / I(ψ_0)

, where U is the log-likelihood function of ψ and I is its Fisher information. The statistic follows χ^2-distribution with 1 degree of freedom when the null hypothesis H_0:ψ=ψ_0 is true.

Value

A p-value.

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. https://doi.org/10.1017/S0305004100023987

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Test the psi of a sample fro mthe Poisson-Dirichlet distribution:
set.seed(10000)
x<-rPD(1000, 10)
## Find the abundances of the data vector:
abund=abundances(table(x))
## Test for the psi that was used, as well as a high one and a low one:
LMTp(abund, 10)
LMTp(abund, 15)
LMTp(abund, 5)
LMTp(abund)       #test for psi=1
LMTp(abund, "r")  #test for psi=n

ville-kinnula/SPEC documentation built on Dec. 23, 2021, 3:11 p.m.