mult.sample.test {PEkit} | R Documentation |
Test for
of multiple samples
Description
Likelihood ratio test for the hypotheses and
, where
...
are the
dispersal parameters of the
samples in the columns of the input data array
x
.
Usage
mult.sample.test(x)
Arguments
x |
The data array to be tested. Each column of |
Details
Calculates the Likelihood Ratio Test statistic
where L is the likelihood function of observing the input samples given
a single
in the numerator and
different parameters
...
for each sample respectively in the denominator. According
to the theory of Likelihood Ratio Tests, this statistic converges in
distribution to a
-distribution when the null-hypothesis is true, where
is the
difference in the amount of parameters between the considered models. To
calculate the statistic, the Maximum Likelihood Estimate for
of
and the shared
of
are calculated.
Value
Gives a vector with the Likelihood Ratio Test -statistic Lambda
, as well as the
p-value of the test p
.
References
Neyman, J., & Pearson, E. S. (1933). On the problem of the most efficient tests of statistical hypotheses. Philosophical Transactions of the Royal Society of London. Series A, Containing Papers of a Mathematical Or Physical Character, 231(694-706), 289-337. <doi: 10.1098/rsta.1933.0009>.
Examples
##Create samples with different n and psi:
set.seed(111)
x<-rPD(1200, 15)
y<-c( rPD(1000, 20), rep(NA, 200) )
z<-c( rPD(800, 30), rep(NA, 400) )
samples<-cbind(cbind(x, y), z)
##Run test
mult.sample.test(samples)