cv.HCgglasso: cv.HCgglasso

Description Usage Arguments Value Author(s) See Also Examples

View source: R/cv.HCgglasso.R

Description

k-fold cross validation for HCgglasso

Usage

1
2
3
cv.HCgglasso(X, y, nfolds = 5, lambda = NULL, hc = NULL,
  weightLevel = NULL, weightSizeGroup = NULL, intercept = TRUE,
  verbose = FALSE, ...)

Arguments

X

matrix of size n*p

y

vector of size n

nfolds

number of folds

lambda

lambda values for group lasso. If not provided, the function generates its own values of lambda

hc

output of hclust function. If not provided, hclust is run with ward.D2 method

weightLevel

a vector of size p for each level of the hierarchy. A zero indicates that the level will be ignored. If not provided, use 1/(height between 2 successive levels)

weightSizeGroup

a vector

intercept

should an intercept be included in the model ?

verbose

print some informations

...

Others parameters for cv.gglasso function

Value

a cv.HCgglasso object containing :

lambda

values of lambda.

cvm

the mean cross-validated error.

cvsd

estimate of standard error of cvm

cvupper

upper curve = cvm+cvsd

cvlower

lower curve = cvm-cvsd

lambda.min

The optimal value of lambda that gives minimum cross validation error cvm.

lambda.1se

The largest value of lambda such that error is within 1 standard error of the minimum.

time

computation time

Author(s)

Quentin Grimonprez

See Also

HCgglasso, stability.HCgglasso, predict.cv.gglasso, coef.cv.HCgglasso, plot.cv.HCgglasso

Examples

1
2
3
4
set.seed(42)
X = simuBlockGaussian(50,12,5,0.7)
y = drop(X[,c(2,7,12)]%*%c(2,2,-2)+rnorm(50,0,0.5))
res = cv.HCgglasso(X,y)

HCgglasso documentation built on May 2, 2019, 4:54 p.m.