sigma_estim_glasso: Graphical Lasso (GLASSO) Covariance Estimation

Description Usage Arguments Details Value References Examples

View source: R/cov-estim-glasso.R

Description

Computes the GLASSO estimator of the covariance matrix.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
sigma_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
)

Arguments

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.

Details

The GLASSO estimator is elaborated in detail in \insertCitefriedman2008sparse;textualCovEstim. More information on the functionality can be found in \insertCiteglassopackage;textualCovEstim and \insertCitecvglassopackage;textualCovEstim.

Value

a list with the following entries

References

\insertAllCited

Examples

1
2
3
data(sp200)
sp_rets <- sp200[,-1]
sigma_glasso <- sigma_estim_glasso(sp_rets, type="cov", rho=0.0001)[[1]]

antshi/CovEstim documentation built on Nov. 13, 2020, 2:25 p.m.