fit_rfsrc: Wrapper of 'randomForestSRC::rfsrc'

View source: R/fit_surv.R

fit_rfsrcR Documentation

Wrapper of randomForestSRC::rfsrc

Description

Wrapper of randomForestSRC::rfsrc

Usage

fit_rfsrc(
  formula,
  data,
  id.var,
  time.var,
  event.var,
  nfold = 1,
  option = list(),
  oob = TRUE,
  tune = TRUE,
  tune.option = list(),
  ...
)

Arguments

formula

formula used by randomForestSRC::rfsrc

data

data containing all covariates, follow-up time, event indicator and id

id.var

see SDRsurv

time.var

see SDRsurv

event.var

see SDRsurv

nfold

number of folds used when fitting survival curves with sample splitting. Default is 1, meaning no sample splitting

option

a list containing optional arguments passed to randomForestSRC::rfsrc. We encourage using a named list. Will be passed to randomForestSRC::rfsrc by running a command like do.call(rfsrc, option). The user should not specify formula and data.

oob

whether to use out-of-bag (OOB) fitted values from randomForestSRC::rfsrc when sample splitting is not used (nfold=1)

tune

whether to tune mtry and nodesize.

tune.option

a list containing optional arguments passed to randomForestSRC::tune.rfsrc if tune=TRUE; ignored otherwise. doBest should not be specified.

...

ignored

Value

a pred_surv class containing fitted survival curves for individuals in data


QIU-Hongxiang-David/SDRsurv documentation built on March 29, 2024, 8:41 a.m.