View source: R/cov_estim_glasso.R
cov_estim_glasso | R Documentation |
Computes the Graphical Lasso (GLASSO) estimator of the covariance matrix.
cov_estim_glasso(
data,
rho = NULL,
type = "cor",
nfolds = 5,
crit = "loglik",
pendiag_log = FALSE,
start = "warm",
tol = 1e-04,
maxit = 10000,
cores = 1,
seed = 1234
)
data |
an nxp data matrix. |
rho |
a double or a sequence, the non-negative regularization parameter |
type |
a character, the type of matrix to be estimated. Possible values are c("cor", "cov"). Default value is "cor" for the correlation matrix. |
nfolds |
an integer, indicating the number of folds for the CV. Default value is 5. |
crit |
a character, indicating which selection criterion within the CV. Possible values are "loglik", "AIC" and "BIC". Default is set to "BIC". |
pendiag_log |
a logical, indicating whether the diagonal of the sample covariance matrix is to be penalized (TRUE) or not (FALSE). Default value is FALSE. |
start |
a character, specifying the start type of the glasso algorithm. Possible values are "warm" or "cold". Default value is "cold". |
tol |
a double, indicating the tolerance for the glasso algorithm. Default value is set to 1e-05. |
maxit |
an integer, indicating the maximum number of iterations for the glasso algorithm. Default value is set to 10000. |
cores |
an integer, indicating how many cores should be used for the CV. Default value is 1. cores cannot be higher than the maximum number of cores of the processor in use. |
seed |
an integer, the seed for the performed cross-validation. Default value is 1234. |
The GLASSO estimator is elaborated in detail in \insertCitefriedman2008sparse;textualcovestim. More information on the functionality can be found in \insertCiteglassopackage;textualcovestim and \insertCitecvglassopackage;textualcovestim.
a list with the following entries
a pxp estimated covariance matrix.
an estimation specific tuning parameter, here the lasso penalty.
data(rets_m)
sigma_glasso <- cov_estim_glasso(rets_m, type = "cov", rho = 0.0001)[[1]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.