spdinv: Inverse of a symmetric positive definite matrix

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/spdinv.R

Description

Inverse of a symmetric positive definite matrix.

Usage

1
spdinv(A)

Arguments

A

A square positive definite matrix.

Details

After calculating the Cholesky decomposition of the matrix we use this upper triangular matrix to invert the original matrix.

Value

The inverse of the input matrix.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr> and Manos Papadakis <papadakm95@gmail.com>.

References

http://econ.nsysu.edu.tw/ezfiles/124/1124/img/Chapter17_MaximumLikelihoodEstimation.pdf

See Also

cholesky, cova

Examples

1
2
3
s <- cova( as.matrix(iris[, 1:4]) )
res<-spdinv(s)
res<-solve(s)

Example output

Loading required package: Rcpp
Loading required package: RcppZiggurat

Rfast documentation built on May 18, 2021, 1:07 a.m.