Learn R Programming

ggRandomForests (version 1.1.2)

kaplan: nonparametric kaplan-meier estimates

Description

nonparametric kaplan-meier estimates

Usage

kaplan(interval, censor, data, strat = NULL, ...)

Arguments

interval
name of the interval variable in the training dataset.
censor
name of the censoring variable in the training dataset.
data
name of the training set data.frame
strat
stratifying variable in the training dataset, defaults to NULL
...
arguments passed to the survfit function

Value

See Also

gg_survival nelson plot.gg_survival

Examples

Run this code
data(pbc, package="randomForestSRC")
pbc$time <- pbc$days/364.25

# This is the same as gg_survival
gg_dta <- kaplan(interval="time", censor="status",
                     data=pbc)

plot(gg_dta, error="none")
plot(gg_dta)

# Stratified on treatment variable.
gg_dta <- gg_survival(interval="time", censor="status",
                     data=pbc, strat="treatment")

plot(gg_dta, error="none")
plot(gg_dta)

Run the code above in your browser using DataLab