default.lambda {penalizedclr}R Documentation

Default values for L1 penalty in conditional logistic regression

Description

Internal function that performs cross validation to determine reasonable default values for L1 penalty in a conditional logistic regression

Usage

default.lambda(X, Y, stratum, nfolds = 10, alpha = 1)

Arguments

X

A matrix of covariates, with the number of rows equaling the number of observations.

Y

A binary response variable.

stratum

A numeric vector with stratum membership of each observation.

nfolds

The number of folds used in cross-validation. Default is 10.

alpha

The elastic net mixing parameter, a number between 0 and 1. alpha=0 would give pure ridge; alpha=1 gives lasso. Pure ridge penalty is never obtained in this implementation since alpha must be positive.

Value

A numeric value for lambda minimizing cross validated deviance.


[Package penalizedclr version 2.0.0 Index]