View source: R/cov_help_funcs.R
make_posdef | R Documentation |
Produces a positive-definite matrix (to a certain tolerance). Originally found under \insertCitecorpcorpackage;textualcovestim.
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
data(rets_m)
ml_sigma <- cov_estim_wrapper2(rets_m, "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.