cvglasso {robustcov}R Documentation

Cross validation to chose tuning parameter of glasso

Description

This routine use k fold cross validation to chose tuning parameter

Usage

cvglasso(
  data,
  k = 10,
  covest = cov,
  rhos = seq(0.1, 1, 0.1),
  evaluation = negLLrobOmega,
  ...
)

Arguments

data

The full dataset, should be a matrix or a data.frame, row as sample

k

number of folds

covest

a *function* or name of a function (string) that takes a matrix to estimate covariance

rhos

a vector of tuning parameter to be tested

evaluation

a *function* or name of a function (string) that takes only two arguments, the estimated covariance and the test covariance, when NULL, we use negative log likelihood on test sets

...

extra arguments send to glasso

Value

a matrix with k rows, each row is the evaluation loss of that fold

Examples

cvglasso(matrix(rnorm(100),20,5))

[Package robustcov version 0.1 Index]