survscreen.glmnet: Wrapper function for glmnet screening algorithm

View source: R/SL_wrappers.R

survscreen.glmnetR Documentation

Wrapper function for glmnet screening algorithm

Description

This screening algorithm uses the glmnet function from the glmnet package to select covariates.

Usage

survscreen.glmnet(
  time,
  event,
  X,
  obsWeights,
  alpha = 1,
  minscreen = 2,
  nfolds = 10,
  nlambda = 100,
  ...
)

Arguments

time

Observed follow-up time; i.e. minimum of the event and censoring times.

event

Observed event indicator; i.e, whether the follow-up time corresponds to an event or censoring.

X

Training covariate data.frame.

obsWeights

Observation weights.

alpha

Penalty exponent for glmnet. Defaults to 1 (lasso penalty).

minscreen

Minimum number of covariates to return. Defaults to 2.

nfolds

Number of folds for cross-validation selection of penalty parameter. Defaults to 10.

nlambda

Number of penalty parameters to search over. Defaults to 100.

...

Additional ignored arguments.

Details

The penalty parameter is selected using cross-validation via cv.glmnet. If this results in fewer than minscreen covariates, the penalty is increased to include minscreen covariates.

Value

Logical vector of the same length as the number of columns of X indicating which variables were included.


tedwestling/survSuperLearner documentation built on Dec. 12, 2024, 4:16 p.m.