pd.solve | R Documentation |
The inverse of a symmetric positive-definite matrix and its log-determinant
pd.solve(x, silent = FALSE, log.det=FALSE)
x |
a symmetric positive-definite matrix. |
silent |
a logical value which indicates the action to take in case of
an error. If |
log.det |
a logical value to indicate whether the log-determinant
of |
The function checks that x
is a symmetric positive-definite
matrix. If an error is detected, an action is taken which depends on the
value of the argument silent
.
the inverse matrix of x
; if log.det=TRUE
, this inverse has an
attribute which contains the logarithm of the determinant of x
.
Adelchi Azzalini
x <- toeplitz(rev(1:4)) x.inv <- pd.solve(x) print(x.inv %*% x) x.inv <- pd.solve(x, log.det=TRUE) logDet <- attr(x.inv, "log.det") print(abs(logDet - determinant(x, logarithm=TRUE)$modulus))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.