plot_model_fits: Model plotting function

Description Usage Arguments Value See Also

View source: R/plotting_functions.R

Description

Provides a neat plot of the provided data, "best fit" line and prediction intervals.

Usage

1
2
plot_model_fits(model_data, actual_data, group, plot_bounds, lower = NULL,
  upper = NULL, infection_times = NULL, plot_title = NULL)

Arguments

model_data

a data frame containing the best fit model trajectory. Should be three columns: variable (time), value and strain. Strain is simply a grouping variable and could be anything (eg. age group, location)

actual_data

a data frame containing the actual data. Columns are same as model_data

group

this is simply used for the file name of the plot. _fit.pdf will be appended

lower

OPTIONAL coordinates of the lower prediction bound

upper

OPTIONAL coordinates of the upper prediction bound

infection_times

OPTIONAL data frame to mark vertical lines representing events. A data frame with columns time and infection, with the time and label respectively

plot_title

OPTIONAL plot title

Value

returns the ggplot object

See Also

restrain_bounds, create_ploygons


jameshay218/mcmcJH documentation built on May 18, 2019, 11:20 a.m.