dcorMVdata: Multivariate Distance Correlation for two sets of variables

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/wdcor.R

Description

Computes the distances within two sets of variables and the corresponding distance correlation.

Usage

1
dcorMVdata(x, ind = 1, method = "euclidean", approx = FALSE)

Arguments

x

The data.frame which should only contain non-factor variables. For factor variables use xtabs in combination with dcorMVtable.

ind

The indices for the first set of variables. The second set consists of all remaining variables.

method

The method for dist.

approx

FALSE for no approximation via binning or an integer value for the number of bins.

Value

The distance correlation between 0 and 1 for the distances from the two sets of variables.

Note

This code has not been tested thoroughly and may still contain errors.

Author(s)

Alexander Pilhoefer

See Also

dcorMVtable, wdcor, approx.dcor

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
	so <- scale(olives[,3:8])
	dcorMVdata(so,ind=1)
	
	p1 <- princomp(so)
	so1 <- cbind(so,p1$scores[,1])
	so2 <- cbind(so,p1$scores[,2])
	so12 <- cbind(so,p1$scores[,1:2])
	
	dcorMVdata(so1,ind=7)
	dcorMVdata(so2,ind=7)
	dcorMVdata(so12,ind=7:8)
	# how about principal curves?

## End(Not run)

extracat documentation built on July 17, 2018, 5:05 p.m.