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

Description Usage Arguments Details Value See Also Examples

View source: R/multivariance-functions.R

Description

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

Usage

1
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)

Details

The computation is faster than the separate computations.

Value

Returns a vector with multivariance, total.multivariance, 2-multivariance and 3-multivariance

See Also

multivariance, total.multivariance, m.multivariance

Examples

1
2
3
4
5
6
7
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)

multivariance documentation built on Oct. 6, 2021, 5:08 p.m.