Learn R Programming

heemod (version 0.6.0)

plot.run_model: Plot Results of a Markov Model

Description

Various plots for Markov models.

Usage

"plot"(x, type = c("counts", "ce", "values"), model = "all", include_states = character(0), panels = c("by_model", "by_state", "by_value"), value = NULL, ...)

Arguments

x
Result from run_model.
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 value or by state (state for counts only)?
value
Names of values to be plotted. These can be any of the costs or effects defined in state files.
...
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