eqdist.etest {energy} | R Documentation |
Performs the nonparametric multisample E-statistic (energy) test for equality of multivariate distributions.
eqdist.etest(x, sizes, distance = FALSE, incomplete = FALSE, N = 100, R = 999)
x |
data matrix of pooled sample |
sizes |
vector of sample sizes |
distance |
logical: if TRUE, first argument is a distance matrix |
incomplete |
logical: if TRUE, compute incomplete E-statistics |
N |
incomplete sample size |
R |
number of bootstrap replicates |
The k-sample multivariate E-test of equal distributions
is performed. The statistic is computed from the original
pooled samples, stacked in matrix x
where each row
is a multivariate observation, or the corresponding distance matrix. The
first sizes[1]
rows of x
are the first sample, the next
sizes[2]
rows of x
are the second sample, etc.
The test is implemented by nonparametric bootstrap, an approximate
permutation test with R
replicates.
The definition of the multisample E-statistic is given in the
ksample.e
documentation.
If incomplete==TRUE
, incomplete E-statistics (which are
incomplete V-statistics) are computed. That is, at most
N
observations from each sample are used, by sampling without replacement
as needed.
A list with class etest.eqdist
containing
method |
Description of test |
statistic |
Observed value of the test statistic |
p.value |
Approximate p-value of the test |
sizes |
Vector of sample sizes |
R |
Number of replicates |
incomplete |
Argument incomplete |
N |
Argument N |
replicates |
Vector of replicates of the statistic |
Maria Rizzo rizzo@math.ohiou.edu
Szekely, G. J. and Rizzo, M. L. (2003) Testing for Equal Distributions in High Dimension, submitted.
Szekely, G. J. (2000) E-statistics: Energy of Statistical Samples, preprint.
## test if the 3 varieties of iris data (d=4) have equal distributions data(iris) eqdist.etest(iris[,1:4], c(50,50,50)) ## univariate two-sample test using incomplete E-statistics x1 <- rnorm(200) x2 <- rnorm(300, .5) eqdist.etest(c(x1, x2), c(200, 300), incomplete=TRUE, N=100)