Skip to contents

Variable selection

Usage

orsf_vs(object, n_predictor_min = 3, verbose_progress = FALSE)

Arguments

object

(orsf_fit) a trained oblique random survival forest (see orsf).

n_predictor_min

(integer) the minimum number of predictors allowed

verbose_progress

(logical) not implemented yet. Should progress be printed to the console?

Value

a data.table with four columns:

  • n_predictors: the number of predictors used

  • stat_value: the out-of-bag statistic

  • predictors_included: the names of the predictors included

  • predictor_dropped: the predictor selected to be dropped

Details

tree_seeds should be specified in object so that each successive run of orsf will be evaluated in the same out-of-bag samples as the initial run.

Examples


object <- orsf(formula = time + status ~ .,
               data = pbc_orsf,
               n_tree = 25,
               importance = 'anova',
               tree_seeds = 1:25)

orsf_vs(object)
#>     n_predictors stat_value                        predictors_included
#>  1:            3  0.7788862                         ascites,edema,bili
#>  2:            4  0.8191550                     age,ascites,edema,bili
#>  3:            5  0.8328819              age,ascites,edema,bili,copper
#>  4:            6  0.8263701      age,ascites,spiders,edema,bili,copper
#>  5:            7  0.8318921 age,ascites,spiders,edema,bili,albumin,...
#>  6:            8  0.8375703    age,ascites,spiders,edema,bili,chol,...
#>  7:            9  0.8316055  age,ascites,hepato,spiders,edema,bili,...
#>  8:           10  0.8221244  age,ascites,hepato,spiders,edema,bili,...
#>  9:           11  0.8237914  age,ascites,hepato,spiders,edema,bili,...
#> 10:           12  0.8301209  age,ascites,hepato,spiders,edema,bili,...
#> 11:           13  0.8413211    id,age,ascites,hepato,spiders,edema,...
#> 12:           14  0.8322307    id,age,ascites,hepato,spiders,edema,...
#> 13:           15  0.8381955    id,age,ascites,hepato,spiders,edema,...
#> 14:           16  0.8229058    id,age,ascites,hepato,spiders,edema,...
#> 15:           17  0.8347833      id,age,sex,ascites,hepato,spiders,...
#> 16:           18  0.8173838          id,trt,age,sex,ascites,hepato,...
#>     predictor_dropped
#>  1:              bili
#>  2:               age
#>  3:            copper
#>  4:           spiders
#>  5:           albumin
#>  6:              chol
#>  7:            hepato
#>  8:           protime
#>  9:               ast
#> 10:             stage
#> 11:                id
#> 12:              trig
#> 13:          alk.phos
#> 14:          platelet
#> 15:               sex
#> 16:               trt