cvglasso: Cross validation to chose tuning parameter of glasso

Description Usage Arguments Value Examples

View source: R/glasso_CV.R

Description

This routine use k fold cross validation to chose tuning parameter

Usage

1
2
3
4
5
6
7
8
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

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

robustcov documentation built on Aug. 4, 2021, 5:07 p.m.