survival_forest {SurvivalClusteringTree} | R Documentation |
Build a Survival Forest (Data Supplied as a Dataframe)
Description
The function
survival_forest
build a survival forest given the survival outcomes and predictors of numeric and factor variables.
Usage
survival_forest(
survival_outcome,
numeric_predictor,
factor_predictor,
weights = NULL,
data,
significance = 0.05,
min_weights = 50,
missing = "omit",
test_type = "univariate",
cut_type = 0,
nboot = 100,
seed = 0
)
Arguments
survival_outcome |
a |
numeric_predictor |
a formula specifying the numeric predictors.
As in |
factor_predictor |
a formula specifying the numeric predictors.
As in |
weights |
sample weights, a numeric vector.
|
data |
the dataframe that stores the outcome and predictor variables.
Variables in the global environment will be used if |
significance |
significance threshold, a numeric value.
Stop the splitting algorithm when no splits give a p-value smaller than |
min_weights |
minimum weight threshold, a numeric value.
The weights in a node are greater than |
missing |
a character value that specifies the handling of missing data.
If |
test_type |
a character value that specifies the type of statistical tests.
If |
cut_type |
an integer value that specifies how to cut between two numeric values.
If |
nboot |
an integer value that specifies the number of bootstrap replications. |
seed |
an integer value that specifies the seed. |
Details
Build a Survival Forest (Data Supplied as a Dataframe)
Value
A list containing the information of the survival forest fit.
Examples
library(survival)
a_survival_forest<-
survival_forest(
survival_outcome=Surv(time,status==2)~1,
numeric_predictor=~age+ph.ecog+ph.karno+pat.karno+meal.cal,
factor_predictor=~as.factor(sex),
data=lung,nboot=20)