| safe_cov_inverse | R Documentation |
Computes a numerically stable inverse of a covariance matrix
safe_cov_inverse(X, ridge = 1e-08, max_ridge_steps = 6)
X |
The n x p design matrix |
ridge |
Initial ridge penalty added to the diagonal |
max_ridge_steps |
Maximum number of ridge escalation attempts |
The inverse covariance matrix
Adam Kapelner
## Not run:
X = matrix(rnorm(20), nrow = 10)
Sinv = safe_cov_inverse(X)
dim(Sinv)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.