getOptLambda {cvwrapr}R Documentation

Get lambda.min and lambda.1se values

Description

Get lambda.min and lambda.1se values and indices.

Usage

getOptLambda(lambda, cvm, cvsd, type.measure)

Arguments

lambda

The values of lambda used in the fits.

cvm

The mean cross-validated error: a vector of length 'length(lambda)'.

cvsd

Estimate of standard error of 'cvm'.

type.measure

Loss function used for CV.

Value

A list with the following elements:

lambda.min

Value of 'lambda' that gives minimum 'cvm'.

lambda.1se

Largest value of 'lambda' such that the error is within 1 standard error of the minimum.

index

A one-column matrix with the indices of 'lambda.min' and 'lambda.1se' in the sequence of coefficients, fits etc.


[Package cvwrapr version 1.0 Index]