Description Usage Arguments Details Value References Examples
View source: R/multivariancefunctions.R
Computes various types of sample distance multicorrelation as defined and discussed in [3,4,6].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19  multicorrelation(
x,
vec = 1:ncol(x),
type = "total.upper.lower",
multicorrelation.type = "normalized",
estimator.type = "bias.corrected",
squared = TRUE,
...
)
Mcor(
x,
vec = 1:ncol(x),
type = "total.upper.lower",
multicorrelation.type = "normalized",
estimator.type = "bias.corrected",
squared = TRUE,
...
)

x 
either a data matrix or a list of doubly centered distance matrices 
vec 
if x is a matrix, then this indicates which columns are treated together as one sample; if x is a list, these are the indexes for which the multivariance is calculated. The default is all columns and all indexes, respectively. 
type 
default: "total.lower.upper", for details and other options see below 
multicorrelation.type 
one of 
estimator.type 
one of 
squared 
if 
... 
these are passed to 
There exist many variants of distance multicorrelation as discussed in [6] – and only in specific cases a direct comparison of the values is meaningful.
The implemented options are:
total.upper.lower normalized bias.corrected
: default; bounded by 1; fast; population limit characterizes independence by 0
pairwise normalized bias.corrected
: bounded by 1; fast; population limit characterizes pairwise independence by 0
total.upper normalized biased
: biased versions of the above
total.lower normalized biased
pairwise normalized biased
multi normalized biased
: population limit characterizes only in case of lower independence the independence of all variables by 0
m.multi.3 normalized biased
: population limit characterizes only in case of pairwise independence the 3independence of all variables by 0
pairwise unnormalized biased
population limit characterizes pairwise independence by 0 and relation by similarity transforms by 1
multi unnormalized biased
: population limit characterizes only in case of lower independence the independence of all variables by 0 and relation by similarity transforms by 1
m.multi.3 unnormalized biased
: population limit characterizes only in case of pairwise independence the 3independence of all variables by 0 and relation by similarity transforms by 1
Further details:
The "bias.corrected"
versions require a data matrix, since they compute bias corrected centered distance matricies.
For "multi"
the unnormalized and normalized version coincide if an even number of variables is considered. They usually differ if an odd number of variables is considered. If all variables are related by similarity transforms the unnormalized "unnormalized"
multicorrelations are 1.
For "pairwise"
an alias is "m.multi.2"
.
For total multicorrelation there is currently only a feasible empirical estimator for a lower or upper bound. These are upper and lower bounds for in the population setting. When using bias corrected estimators these are in general no proper bounds, but their range can be used as values for comparisons.
Value of the multicorrelation(s).
For the theoretic background see the references [2,3,6] given on the main help page of this package: multivariancepackage.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21  y = rnorm(100)
x = cbind(y,y*2,(y2)/3,y+1,y*5) # all variables are related by similarity transforms
# compute all types of correlations for x:
for (ty in c("total.lower","total.upper","pairwise","m.multi.3","multi"))
for (mty in c("normalized"))
print(paste(format(multicorrelation(
x,type=ty,multicorrelation.type = mty,estimator.type = "biased")
,digits=3,nsmall = 3,width = 7),mty,ty,"correlation  biased estimate"))
for (ty in c("total.upper.lower","pairwise"))
for (mty in c("normalized"))
print(paste(format(multicorrelation(
x,type=ty,multicorrelation.type = mty,estimator.type = "bias.corrected")
,digits=3,nsmall = 3,width = 7),mty,ty,"correlation  bias corrected estimate"))
for (ty in c("m.multi.2","m.multi.3","multi"))
for (mty in c("unnormalized"))
print(paste(format(multicorrelation(
x,type=ty,multicorrelation.type = mty,estimator.type = "biased")
,digits=3,nsmall = 3,width = 7),mty,ty,"correlation  biased estimate"))

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.