survscreen.glmnet | R Documentation |
This screening algorithm uses the glmnet
function from the glmnet
package to select covariates.
survscreen.glmnet(
time,
event,
X,
obsWeights,
alpha = 1,
minscreen = 2,
nfolds = 10,
nlambda = 100,
...
)
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 |
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. |
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.
Logical vector of the same length as the number of columns of X
indicating which variables were included.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.