View source: R/glmnetsurvfit.R
permuteImp | R Documentation |
Computes the relative importance based on random permutation of focal variable for various survival models.
permuteImp(model, newdata, nrep = 50)
model |
fitted |
newdata |
optional data frame containing the variables appearing on the right hand side of |
nrep |
number of replicates for permulations |
Given predictors x_1, x_2, ..., x_n
used to predict the survival outcome, y
. Suppose, for example, x_1
has low predictive power for the response. Then, if we randomly permute the observed values for x_1
, then the prediction for y
will not change much. Conversely, if any of the predictors highly predicts the response, the permutation of that specific predictor will lead to a considerable change in the predictive measure of the model. In this case, we conclude that this predictor is important. In our implementation, Harrel's concordance index is used to measure the prediction accuracy.
a named vector of variable scores
data(veteran, package="survival") # Penalized lam <- 0.1 alp <- 0.5 pfit1 <- glmnetsurv(Surv(time, status) ~ factor(trt) + karno + diagtime + age + prior , data = veteran , lambda = lam , alpha = alp ) imp <- permuteImp(pfit1, newdata = veteran, nrep = 50) imp
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.