multidcov {steadyICA} | R Documentation |
Symmetric multivariate distance covariance
Description
Calculate either the symmetric or asymmetric multivariate distance covariance statistic.
Usage
multidcov(S,symmetric=TRUE,alpha=1)
Arguments
S |
the n x d matrix for which you wish to calculate the dependence between d columns from n samples |
alpha |
A scaling parameter in the interval (0,2] used for calculating distances. |
symmetric |
logical; if TRUE (the default), calculates the symmetric version of the multivariate distance covariance. See details. |
Details
If symmetric==TRUE, calculates: sum_i=1^d dcovustat(S[,i],S[,-i]) If symmetric==FALSE, calculates: sum_i=1^d-1 dcovustat(S[,i],S[,(i+1):d])
Value
returns a scalar equal to the multivariate distance covariance statistic for the columns of S
Author(s)
David Matteson
See Also
Examples
nObs <- 1024
nComp <- 3
simM <- matrix(rnorm(nComp*nComp),nComp)
# simulate some data:
simS<-cbind(rgamma(nObs, shape = 1, scale = 2),
rgamma(nObs, shape = 3, scale = 2),
rgamma(nObs, shape = 9, scale = 0.5))
simS <- scale(simS) #Standardize variance for identifiability
#mix the sources:
xData <- simS %*% simM
multidcov(simS) #close to zero
multidcov(whitener(xData)$Z) #should be larger than simS
multidcov(xData) #greater than zero
[Package steadyICA version 1.0 Index]