Skip to contents

Creates decision tree graphs for cost-effectiveness analysis with typical decision nodes, chance nodes, and terminal nodes. Supports visualization of treatment pathways, probabilities, costs, and outcomes.

Usage

decisiongraph(
  data,
  treeType = "costeffectiveness",
  decisions,
  healthStates,
  transitionProbs,
  cycleLength = 1,
  probabilities,
  costs,
  utilities,
  outcomes,
  layout = "horizontal",
  nodeShapes = TRUE,
  showProbabilities = TRUE,
  showCosts = TRUE,
  showUtilities = TRUE,
  calculateExpectedValues = TRUE,
  sensitivityAnalysis = FALSE,
  discountRate = 0.03,
  timeHorizon = 10,
  nodeLabels = TRUE,
  branchLabels = TRUE,
  colorScheme = "medical",
  summaryTable = TRUE,
  tornado = FALSE
)

Arguments

data

The data as a data frame containing decision tree parameters.

treeType

Type of decision tree to create.

decisions

Variables representing decision nodes (treatment options).

healthStates

Variables defining health states for Markov model.

transitionProbs

Variables containing transition probabilities between health states.

cycleLength

Length of each Markov cycle in years.

probabilities

Variables containing probability values for chance nodes.

costs

Variables containing cost values for terminal nodes.

utilities

Variables containing utility/effectiveness values.

outcomes

Variables representing clinical outcomes.

layout

Layout orientation for the decision tree.

nodeShapes

Use different shapes for different node types.

showProbabilities

Display probability values on tree branches.

showCosts

Display cost values at terminal nodes.

showUtilities

Display utility/effectiveness values.

calculateExpectedValues

Calculate and display expected costs and utilities.

sensitivityAnalysis

Perform one-way sensitivity analysis on key parameters.

discountRate

Annual discount rate for future costs and benefits.

timeHorizon

Time horizon for the analysis in years.

nodeLabels

Display descriptive labels for nodes.

branchLabels

Display labels on tree branches.

colorScheme

Color scheme for the decision tree visualization.

summaryTable

Show summary table with expected values and cost-effectiveness ratios.

tornado

Create tornado diagram for sensitivity analysis.

Value

A results object containing:

results$treeplotDecision tree visualization with nodes and branches
results$summaryTablea table
results$nodeTablea table
results$tornadoplotSensitivity analysis tornado diagram
results$sensitivityTablea table
results$text1a html
results$text2a html
results$markovTablea table
results$markovCohortTablea table
results$markovPlotMarkov state transition diagram

Tables can be converted to data frames with asDF or as.data.frame. For example:

results$summaryTable$asDF

as.data.frame(results$summaryTable)

Examples

# \donttest{
# example will be added
# }