Description Usage Arguments Value References Examples
View source: R/cov-estim-help.R
Produces a positive-definite matrix (to a certain tolerance). Originally found under \insertCitecorpcorpackage;textualCovEstim.
1 | make_posdef(mat, tol = 1e-08)
|
mat |
a pxp matrix. |
tol |
a double, the tolerance for the relative positiveness of eigenvalues compared to the largest eigenvalue. Default value is tol=1e-8. If NULL, a machine tolerance approximation is applied. |
a positive-definite (to the tolerance of tol) matrix.
corpcorpackageCovEstim
1 2 3 4 5 6 | data(sp200)
sp_rets <- sp200[1:100,-1]
ml_sigma <- sigma_estim(sp_rets, "ML")
is_posdef(ml_sigma)
ml_sigma_posdef <- make_posdef(ml_sigma)
is_posdef(ml_sigma_posdef)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.