vect_norm: Calculate the Mahalonobis Norm of a Vector

Description Usage Arguments Value

View source: R/utils.R

Description

Calculate the Mahalonobis Norm of a Vector

Usage

1
vect_norm(x, matr = NULL, sqrt = TRUE, solve_matr = FALSE)

Arguments

x

a vector

matr

the weighting matrix in the Mahalonobis norm. if null, the l2 norm is calculated.

sqrt

if false, don't take the sqrt of the product

solve_matr

if true, invert matr before calculating the norm

Value

the norm, a real number >= 0


itamarfaran/corrpops documentation built on Dec. 20, 2021, 8:02 p.m.