plot.run_model: Plot Results of a Markov Model

View source: R/strategy_print.R

plot.run_modelR Documentation

Plot Results of a Markov Model

Description

Various plots for Markov models.

Usage

## S3 method for class 'run_model'
plot(
  x,
  type = c("counts", "ce", "values"),
  panels = c("by_strategy", "by_state", "by_value"),
  values = NULL,
  strategy = NULL,
  states = NULL,
  free_y = FALSE,
  bw = FALSE,
  ...
)

Arguments

x

Result from run_model().

type

Type of plot, see details.

panels

Should plots be faceted by model, by value or by state?

values

Names of values to be plotted. These can be any of the costs or effects defined in states.

strategy

Name or position of model(s) of interest.

states

Names of states to be included in the plot.

free_y

Should y limits be free between panels?

bw

Black & white plot for publications?

...

Additional arguments passed to plot.

type = "counts" represents state memberships (corrected) by cycle, type = "ce" plots models on the cost-efficiency plane with the efficiency frontier, and type = "values" state values per cycle.

When states is specified, the states will be turned into a factor with the ordering given in the variable, so that plotting order can be controlled.

Value

A ggplot2 object.

Examples


## These examples require \code{res_mod} from the hip replacement model discussed in
## `vignette("non-homogeneous", package = "heemod")`.

## Not run: 
  plot(res_mod)

  plot(res_mod, model = "all")
  plot(res_mod, model = "all", panels = "by_state")

  plot(res_mod, model = "all", include_states = c("RevisionTHR", "SuccessR"))
  plot(res_mod, model = "all", panels = "by_state", include_states = c("RevisionTHR", "SuccessR"))
 
  plot(res_mod, model = 2, panel = "by_state", include_states = c("RevisionTHR", "SuccessR"))
  

## End(Not run)

heemod documentation built on May 29, 2024, 8:17 a.m.