View source: R/survival_forest_dataframe.R
survival_forest | R Documentation |
The function
survival_forest
build a survival forest given the survival outcomes and predictors of numeric and factor variables.
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
)
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. |
Build a Survival Forest (Data Supplied as a Dataframe)
A list containing the information of the survival forest fit.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.