Learn R Programming

heemod (version 0.4.0)

plot.run_models: Plot Results of a Markov Model

Description

Various plots for Markov models.

Usage

"plot"(x, type = c("counts", "ce"), model = 1, include_states = character(0), panels = c("by_model", "by_state"), ...)

Arguments

x
Result from run_models.
type
Type of plot, see details.
model
Name or position of model of interest.
include_states
Names of states to be included in the plot.
panels
Should plots be faceted by model or by state?
...
Additional arguments passed to plot.

Value

A ggplot2 object.

Details

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

When type = "count", model can be a vector of model numbers or names, or "all".

include_states and panels are active only when type = "count". When include_states = character(0) (the default), all states will be included.

Examples

Run this code

## 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)

Run the code above in your browser using DataLab