Learn R Programming

multivariance (version 2.4.1)

multivariances.all: simultaneous computation of multivariance and total/ 2-/ 3-multivariance

Description

Computes simultaneously multivariance, total multivariance, 2-multivariance and 3-multivariance.

Usage

multivariances.all(x, vec = NA, Nscale = TRUE, squared = TRUE, ...)

Arguments

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.

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.

See Also

multivariance, total.multivariance, m.multivariance

Examples

Run this code
# 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)


# }

Run the code above in your browser using DataLab