PruneByOutcome: Prune Trees by Outcome

View source: R/PruneByOutcome.R

PruneByOutcomeR Documentation

Prune Trees by Outcome

Description

Utility to subset trees by leaf outcome

Usage

PruneByOutcome(TREE, outcome, negate = FALSE)

Arguments

TREE

an input tree

outcome

a string for a variable that can be interpreted as >0 on positive outcome leaves

negate

whether the indicator should be negated

Details

The purpose of this utility is to allow calculation of tree averages conditional on a specified outcome. This has particular usefulness if a tree is to calculate transitions for use in with other models (e.g. ODEs or Markov models)

Value

a pruned tree only containing routes to leaves with positive outcomes

Author(s)

Pete Dodd


petedodd/HEdtree documentation built on Jan. 27, 2025, 12:36 p.m.