This function loads the run outputs from a specified file, extracts the outcomes data, and creates a boxplot of costs and QALY (Quality-Adjusted Life Year) outcomes. The plot is saved as a PNG file.

plot_outcomes(object)

Arguments

object

An S4 object that contains the program name and outcomes data.

Value

A ggplot object representing the boxplot of costs and QALY outcomes.

Details

The function performs the following steps:

  • Loads the run outputs from a file located in the "outputs" directory.

  • Extracts the outcomes data from the loaded object.

  • Binds the costs and QALY data into a single data frame.

  • Creates a boxplot of the costs and QALY data using ggplot2.

  • Saves the plot as a PNG file in the "figs" subdirectory of the "outputs" directory.