KiK {qfratio}R Documentation

Matrix square root and generalized inverse

Description

This internal function calculates the decomposition S=KKT\mathbf{S} = \mathbf{K} \mathbf{K}^T for an n×nn \times n covariance matrix S\mathbf{S}, so that K\mathbf{K} is an n×mn \times m matrix with mm being the rank of S\mathbf{S}. Returns this K\mathbf{K} and its generalized inverse, K\mathbf{K}^-, in a list.

Usage

KiK(S, tol = .Machine$double.eps * 100)

Arguments

S

Covariance matrix. Symmetry and positive (semi-)definiteness are checked.

tol

Tolerance to determine the rank of S\mathbf{S}. Eigenvalues smaller than this value are considered zero.

Details

At present, this utilizes svd(), although there may be better alternatives.

Value

List with K and iK, with the latter being K\mathbf{K}^-


[Package qfratio version 1.1.1 Index]