Performs a distance covariance test.
distcov.test(
X,
Y,
method = "permutation",
b = 499L,
ln = 20,
affine = FALSE,
standardize = FALSE,
bias.corr = FALSE,
type.X = "sample",
type.Y = "sample",
metr.X = "euclidean",
metr.Y = "euclidean",
use = "all",
return.data = FALSE,
algorithm = "auto"
)distcov.test object
contains either the first sample or its corresponding distance matrix.
In the first case, X can be provided either as a vector (if one-dimensional), a matrix or a data.frame (if two-dimensional or higher).
In the second case, the input must be a distance matrix corresponding to the sample of interest.
If X is a sample, type.X must be specified as "sample". If X is a distance matrix, type.X must be specified as "distance".
see X.
specifies the type of test that is performed.
"permutation" performs a Monte Carlo Permutation test.
"gamma" performs a test based on a gamma approximation of the test statistic under the null huang2017statisticallydcortools. This test tends to be anti-conservative, if the ``real'' p-value is small
"conservative" performs a conservative two-moment approximation berschneider2018complexdcortools.
"bb3" performs a three-moment approximation berschneider2018complexdcortools. This is the most precise parametric option, but only available with the standard algorithm.
"wildbs1" and "wilbs2" perform wild bootstrap tests chwialkowski2014wilddcortools; experimental at the moment.
integer; specifies the number of random permutations/bootstrap samples used for the permutation or wild bootstraps tests. Ignored for other tests.
numeric; block size parameter for wild bootstrap tests. Ignored for other tests.
logical; specifies if the affinely invariant distance covariance dueck2014affinelydcortools should be calculated or not.
logical; specifies if X and Y should be standardized dividing each component by its standard deviations. No effect when affine = TRUE.
logical; specifies if the bias corrected version of the sample distance covariance huo2016fastdcortools should be calculated.
For "distance", X is interpreted as a distance matrix. For "sample", X is interpreted as a sample.
see type.X.
specifies the metric which should be used to compute the distance matrix for X (ignored when type.X = "distance").
Options are "euclidean", "discrete", "alpha", "minkowski", "gaussian", "gaussauto", "boundsq" or user-specified metrics (see examples).
For "alpha", "minkowski", "gauss", "gaussauto" and "boundsq", the corresponding parameters are specified via "c(metric, parameter)", c("gaussian", 3) for example uses a Gaussian metric with bandwidth parameter 3; the default parameter is 2 for "minkowski" and "1" for all other metrics.
See lyons2013distance,sejdinovic2013equivalence,bottcher2017detecting;textualdcortools for details.
see metr.X.
specifies how to treat missing values. "complete.obs" excludes NAs, "all" uses all observations.
logical; specifies if the test object should contain the original data.
specifies the algorithm used for calculating the distance covariance.
"fast" uses an O(n log n) algorithm if the observations are one-dimensional and metr.X and metr.Y are either "euclidean" or "discrete", see also huo2016fast;textualdcortools.
"memsave" uses a memory saving version of the standard algorithm with computational complexity O(n^2) but requiring only O(n) memory.
"standard" uses the classical algorithm. User-specified metrics always use the classical algorithm.
"auto" chooses the best algorithm for the specific setting using a rule of thumb.
berschneider2018complexdcortools
bottcher2017detectingdcortools
chwialkowski2014wilddcortools
dueck2014affinelydcortools
huang2017statisticallydcortools
huo2016fastdcortools
lyons2013distancedcortools
sejdinovic2013equivalencedcortools
szekely2007dcortools
szekely2009browniandcortools