ICcforest: Fit a conditional inference forest for interval-censored...

Description Usage Arguments Details Value See Also Examples

View source: R/ICcforest.R

Description

An implementation of the random forest and bagging ensemble algorithms utilizing conditional inference trees as base learners for interval-censored survival data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
ICcforest(
  formula,
  data,
  mtry = NULL,
  ntree = 100L,
  applyfun = NULL,
  cores = NULL,
  na.action = na.pass,
  suppress = TRUE,
  trace = TRUE,
  perturb = list(replace = FALSE, fraction = 0.632),
  control = partykit::ctree_control(teststat = "quad", testtype = "Univ", mincriterion =
    0, saveinfo = FALSE, minsplit = nrow(data) * 0.15, minbucket = nrow(data) * 0.06),
  ...
)

Arguments

formula

a formula object, with the response being a Surv object, with form

Surv(time1, time2, type="interval2").

data

a data frame containing the variables named in formula.

mtry

number of input variables randomly sampled as candidates at each node for random forest like algorithms. The default mtry is tuned by tuneICRF.

ntree

an integer, the number of the trees to grow for the forest. ntree = 100L is set by default.

applyfun

an optional lapply-style function with arguments function(X, FUN, ...). It is used for computing the variable selection criterion. The default is to use the basic lapply function unless the cores argument is specified (see below). See ctree_control.

cores

numeric. If set to an integer the applyfun is set to mclapply with the desired number of cores. See ctree_control.

na.action

a function which indicates what should happen when the data contain missing values.

suppress

a logical specifying whether the messages from getFitEsts are suppressed. If FALSE, the messages are printed. suppress = TRUE is set by default.

trace

whether to print the progress of the search of the optimal value of mtry when mtry is not specified (see tuneICRF). trace = TRUE is set by default.

perturb

a list with arguments replace and fraction determining which type of resampling, with replace = TRUE referring to the n-out-of-n bootstrap and replace = FALSE referring to sample splitting. fraction is the proportion of observations to draw without replacement.

control

a list of control parameters, see ctree_control. control parameters minsplit, minbucket have been adjusted from the cforest defaults. Other default values correspond to those of the default values used by ctree_control.

...

additional arguments.

Details

ICcforest returns an ICcforest object. The object belongs to the class ICcforest, as a subclass of cforest. This function extends the conditional inference survival forest algorithm in cforest to fit interval-censored survival data.

Value

An object of class ICcforest, as a subclass of cforest.

See Also

predict.ICcforest for prediction, gettree.ICcforest for individual tree extraction, and tuneICRF for mtry tuning.

Examples

1
2
3
4
5
6
7
8
9
#### Example with miceData
library(icenReg)
data(miceData)

## For ICcforest to run, Inf should be set to be a large number, for example, 9999999.
miceData$u[miceData$u == Inf] <- 9999999.

## Fit an iterval-censored conditional inference forest
Cforest <- ICcforest(Surv(l, u, type = "interval2") ~ grp, data = miceData)

ICcforest documentation built on Feb. 17, 2020, 9:07 a.m.