two.sample.test {PEkit} | R Documentation |
Two sample test for
Description
Likelihood ratio test for the hypotheses and
, where
and
are the
dispersal parameters of two input samples
s1
and s2
.
Usage
two.sample.test(s1, s2)
Arguments
s1 , s2 |
The two data vectors to be tested. |
Details
Calculates the Likelihood Ratio Test statistic
where L is the likelihood function of observing the two input samples given
a single in the numerator and two different parameters
and
for each sample respectively in the denominator. According
to the theory of Likelihood Ratio Tests, this statistic converges in
distribution to a
-distribution under the null-hypothesis, where
is the
difference in the amount of parameters between the considered models, which
is 1 here. 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(500, 15)
y<-rPD(1000, 20)
z<-rPD(800, 30)
##Run tests
two.sample.test(x,y)
two.sample.test(x,z)
two.sample.test(y,z)