View source: R/default.lambda.R
default.lambda | R Documentation |
Internal function that performs cross validation to determine reasonable default values for L1 penalty in a conditional logistic regression
default.lambda(X, Y, stratum, nfolds = 10, alpha = 1)
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. |
A numeric value for lambda
minimizing cross validated deviance.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.