surv.tree: Kaplan-Meier from survival tree

View source: R/surv.tree.R

surv.treeR Documentation

Kaplan-Meier from survival tree

Description

Plot with a Kaplan-Meier curve with node leafs identified by recursive partitioning.

Usage

surv.tree(
  rpart.tree,
  tree,
  time.var,
  event.var,
  return.data = F,
  curve.type = "survival"
)

Arguments

rpart.tree

A object generated through FlowCT::rpart.tree().

tree

Specify the tree name, i.e. "original" or "pruned".

time.var

Survival time variable.

event.var

Variable with event censoring.

return.data

Metadata with node leafs distribution should be returned. Default = FALSE.

curve.type

Plotting curve methodology, i.e. "survival" (default) or "cumulative" (for progressions).

Examples

## Not run: 
surv.tree(rpart.tree = tr, tree = "original", time.var = "PFS", event.var = "PFS_c")

## End(Not run)

jgarces02/FlowCT documentation built on March 28, 2023, 12:42 p.m.