Description Usage Arguments Details Value References Examples
View source: R/Parameter_estimation_and_hypothesis_testing.R
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.
1 | LMTp(abund, psi = "a")
|
abund |
An abundance vector. |
psi |
Target ψ to be tested. |
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.
A p-value.
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
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.