invertinfo | R Documentation |
Stable function for computing a covariance matrix from a given Fisher information matrix by inversion.
invertinfo(mat, silent=TRUE, stopOnError=FALSE)
mat |
a Fisher Information Matrix. |
silent |
logical value. If |
stopOnError |
logical value. If |
A Cholesky decomposition is used to obtain the covariance matrix. This can be done because the Fisher information matrix is symmetric and positive definite.
This function is meant to be a more stable alternative to the function solve
, which does not take into account, that the matrix is symmetric and positive definite.
A list containing the following components:
vcov |
the covariance matrix. |
error_message |
possible error messages that occured when inverting the Fisher information matrix. |
Tobias Liboschik and Philipp Probst
chol
and chol2inv
.
library(Matrix)
invertinfo(Hilbert(5), stopOnError=TRUE)
invertinfo(Hilbert(100))
invertinfo(Hilbert(100), silent=FALSE)
## Not run: invertinfo(Hilbert(100), stopOnError=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.