| dcor.xy {fda.usc} | R Documentation |
Distance Correlation Statistic and t-Test
Description
Distance correlation t-test of multivariate and functional independence (wrapper functions of energy package).
Usage
dcor.xy(x, y, test = TRUE, metric.x, metric.y, par.metric.x, par.metric.y, n)
dcor.dist(D1, D2)
bcdcor.dist(D1, D2, n)
dcor.test(D1, D2, n)
Arguments
x |
data (fdata, matrix or data.frame class) of first sample. |
y |
data (fdata, matrix or data.frame class) of second sample. |
test |
if TRUE, compute bias corrected distance correlation statistic and the corresponding t-test, else compute distance correlation statistic. |
metric.x, metric.y |
Name of metric or semi-metric function used for
compute the distances of |
par.metric.x, par.metric.y |
List of parameters for the corresponding metric function. |
n |
The sample size used in bias corrected version of distance
correlation, by default is the number of rows of |
D1 |
Distances of first sample (x data). |
D2 |
Distances of second sample (y data). |
Details
These wrapper functions extend the functions of the energy package
for multivariate data to functional data. Distance correlation is a measure
of dependence between random vectors introduced by Szekely, Rizzo, and
Bakirov (2007).
dcor.xy performs a nonparametric t-test of multivariate or functional
independence in high dimension. The distribution of the test statistic is
approximately Student t with n(n-3)/2-1 degrees of freedom and for
n \geq 10 the statistic is approximately distributed as standard
normal. Wrapper function of energy:::dcor.ttest. The t statistic is
a transformation of a bias corrected version of distance correlation (see SR
2013 for details). Large values (upper tail) of the t statistic are
significant.
dcor.test similar to dcor.xy but only for distance matrix.
dcor.dist compute distance correlation statistic. Wrapper function
of energy::dcor but only for distance matrix
bcdcor.dist compute bias corrected distance correlation statistic.
Wrapper function of energy:::bcdcor but only for distance matrix.
Value
dcor.test returns a list with class htest containing
-
methoddescription of test -
statisticobserved value of the test statistic -
parameterdegrees of freedom -
estimatebias corrected distance correlationbcdcor(x,y) -
p.valuep-value of the t-test -
data.namedescription of data
dcor.xy returns the previous list with class htest and
-
D1the distance matrix ofx -
D2the distance matrix ofy
dcor.dist returns the distance correlation statistic.
bcdcor.dist returns the bias corrected distance correlation
statistic.
Author(s)
Manuel Oviedo de la Fuente manuel.oviedo@udc.es and Manuel Febrero Bande
References
Szekely, G.J. and Rizzo, M.L. (2013). The distance correlation t-test of independence in high dimension. Journal of Multivariate Analysis, Volume 117, pp. 193-213.
Szekely, G.J., Rizzo, M.L., and Bakirov, N.K. (2007), Measuring and Testing Dependence by Correlation of Distances, Annals of Statistics, Vol. 35 No. 6, pp. 2769-2794.
See Also
metric.lp amd metric.dist.
Examples
## Not run:
x<-rproc2fdata(100,1:50)
y<-rproc2fdata(100,1:50)
dcor.xy(x, y,test=TRUE)
dx <- metric.lp(x)
dy <- metric.lp(y)
dcor.test(dx, dy)
bcdcor.dist(dx, dy)
dcor.xy(x, y,test=FALSE)
dcor.dist(dx, dy)
## End(Not run)