pd.matrix: Postive-definite matrix operations

pd.solveR Documentation

Postive-definite matrix operations

Description

These functions provide matrix operations for positive-definite and positive-semidefinite matrices (e.g., covariance matrices) that can better handle ill-conditioned matrices, which is a common problem in likelihood estimation with covariance models.

Usage

pd.solve(M,sym=TRUE,semi=TRUE,...)

pd.logdet(M,sym=TRUE,semi=TRUE,...)

pd.sqrtm(M,semi=TRUE,...)

Arguments

M

A square matrix.

sym

Assume the matrix to be symmetric.

semi

Assume the matrix to only be positive semidefinite (variances can be zero), rather than strictly positive definite (variances must be positive).

...

Optional arguments to other functions, such as qr.solve.

Details

If semi=FALSE, all true variances are assumed to be positive and any numerically estimated variances that fall below machine precision are extrapolated from the numerically estimated variances that fall above machine precision.

Infinite variances can be exactly handled, as long as they are not correlated with finite variances.

Value

pd.solve returns the matrix inverse, pd.logdet returns the logarithm of the determinant, and pd.sqrtm returns the square-root matrix.

Author(s)

C. H. Fleming.

See Also

qr.solve, det


ctmm-initiative/ctmm documentation built on Jan. 31, 2025, 8:36 a.m.