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.
Nscale
if TRUE the multivariance is scaled up by the sample size (and thus it is exactly as required for the test of independence)
squared
if FALSE it returns the actual multivariance, otherwise the squared multivariance (less computation)
...
these are passed to cdms (which is only invoked if x is a matrix)
Value
Returns a vector with multivariance, total.multivariance, 2-multivariance and 3-multivariance
Details
The computation is faster than the separate computations.
# NOT RUN {x = coins(100,k = 3)
multivariances.all(x)
# yields the same as:multivariance(x)
total.multivariance(x)
m.multivariance(x,m=2)
m.multivariance(x,m=3)
# }