Description Usage Arguments Details Value References Examples
View source: R/cov-estim-glasso.R
Computes the GLASSO estimator of the covariance matrix.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
data |
an nxp data matrix. |
rho |
a double or a sequence, the non-negative regularization parameter ρ for lasso. ρ=0 means no regularization. Can be a scalar (usual) or a symmetric p by p matrix, or a vector of length p. In the latter case, the penalty matrix has jkth element √{ρ_j*ρ_k}. Default value is NULL and an optimal regularization is computed with the cross-validation (CV) procedure as in \insertCitecvglassopackage;textualCovEstim. |
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.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.