1\name{mvI.test}
2\alias{mvI.test}
3\alias{mvI}
4\title{ Energy Statistic Test of Independence}
5\description{
6 Computes the multivariate nonparametric E-statistic and test of independence
7 based on independence coefficient \eqn{\mathcal I_n}{I_n}.}
8\usage{
9    mvI.test(x, y, R)
10    mvI(x, y)
11}
12\arguments{
13  \item{x}{ matrix: first sample, observations in rows}
14  \item{y}{ matrix: second sample, observations in rows}
15  \item{R}{ number of replicates}
16}
17\details{
18 Computes the coefficient \eqn{\mathcal I}{I_n} and performs a nonparametric
19 \eqn{\mathcal E}{E}-test of independence. The test decision is obtained via
20 bootstrap, with \code{R} replicates.
21 The sample sizes (number of rows) of the two samples must agree, and
22 samples must not contain missing values. The statistic
23 \eqn{\mathcal E = n \mathcal I^2}{E = I^2} is a ratio of V-statistics based
24 on interpoint distances \eqn{\|x_{i}-y_{j}\|}{||x_{i}-y_{j}||}.
25 See the reference below for details.
26}
27\value{
28\code{mvI} returns the statistic. \code{mvI.test} returns
29 a list with class
30 \code{htest} containing
31 \item{     method}{ description of test}
32 \item{  statistic}{ observed value of the test statistic \eqn{n\mathcal I_n^2}{n I_n^2}}
33 \item{   estimate}{ \eqn{\mathcal I_n}{I_n}}
34 \item{ replicates}{ replicates of the test statistic}
35 \item{    p.value}{ approximate p-value of the test}
36 \item{  data.name}{ description of data}
37}
38\references{
39 Bakirov, N.K., Rizzo, M.L., and Szekely, G.J. (2006), A Multivariate
40 Nonparametric Test of Independence, \emph{Journal of Multivariate Analysis}
41 93/1, 58-80, \cr
42 \doi{10.1016/j.jmva.2005.10.005}
43 }
44 \note{
45 Historically this is the first energy test of independence. The
46 distance covariance test  \code{\link{dcov.test}}, distance correlation
47 \code{\link{dcor}}, and related methods are more recent (2007,2009).
48 The distance covariance test is faster and has different properties than
49 \code{mvI.test}. Both methods are based on a population independence coefficient
50 that characterizes independence and both tests are statistically consistent.
51 }
52\author{ Maria L. Rizzo \email{mrizzo @ bgsu.edu} and
53Gabor J. Szekely
54}
55 \seealso{
56 \code{ \link{indep.test} }
57 \code{ \link{mvI.test} }
58 \code{ \link{dcov.test} }
59 \code{ \link{dcov} }
60 }
61 \keyword{ htest }
62 \keyword{ multivariate }
63 \keyword{ nonparametric }
64 \concept{ independence }
65 \concept{ energy statistics }
66
67