Description Usage Arguments Details Value Examples
Use the multinomial distribution to test the hypothesis that two samples come from the same distribution.
1 | bhatt.test(y, x, k)
|
y, x |
Samples to be compared. |
k |
Number of proportions. |
It is assumed that the two samples come from the same kernel density distribution. The support of the KDE of the first sample is divided into k equally spaced quantiles, and then compared to the corresponding proportions of the second.
bat.test: A list with the following components:
df=2*k: where k is the number of proportions used.
y.prop, x.prop: Vectors of proportions.
D2: Measure of divergence between samples.
test.stat: The test statistic for the Bhattacharrayya test.
p.value: The p-value of the test.
1 2 3 | y <- rnorm(1000)
x <- rnorm(1000)
bhatt.test(y,x,10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.