Skip to contents

Growth rate timeseries diagram

Usage

plot_growth_rate(
  modelled,
  ...,
  mapping = .check_for_aes(modelled, ...),
  events = i_events
)

Arguments

modelled

a growth rate dataframe. - EITHER: a dataframe with columns:

  • time (ggoutbreak::time_period + group_unique) - A (usually complete) set of singular observations per unit time as a `time_period`

  • incidence.fit (double) - an estimate of the incidence rate on a log scale

  • incidence.se.fit (positive_double) - the standard error of the incidence rate estimate on a log scale

  • incidence.0.025 (positive_double) - lower confidence limit of the incidence rate (true scale)

  • incidence.0.5 (positive_double) - median estimate of the incidence rate (true scale)

  • incidence.0.975 (positive_double) - upper confidence limit of the incidence rate (true scale)

  • growth.fit (double) - an estimate of the growth rate

  • growth.se.fit (positive_double) - the standard error the growth rate

  • growth.0.025 (double) - lower confidence limit of the growth rate

  • growth.0.5 (double) - median estimate of the growth rate

  • growth.0.975 (double) - upper confidence limit of the growth rate

Any grouping allowed.

OR with columns:

  • time (ggoutbreak::time_period + group_unique) - A (usually complete) set of singular observations per unit time as a `time_period`

  • proportion.fit (double) - an estimate of the proportion on a logit scale

  • proportion.se.fit (positive_double) - the standard error of proportion estimate on a logit scale

  • proportion.0.025 (proportion) - lower confidence limit of proportion (true scale)

  • proportion.0.5 (proportion) - median estimate of proportion (true scale)

  • proportion.0.975 (proportion) - upper confidence limit of proportion (true scale)

  • relative.growth.fit (double) - an estimate of the relative growth rate

  • relative.growth.se.fit (positive_double) - the standard error the relative growth rate

  • relative.growth.0.025 (double) - lower confidence limit of the relative growth rate

  • relative.growth.0.5 (double) - median estimate of the relative growth rate

  • relative.growth.0.975 (double) - upper confidence limit of the relative growth rate

Any grouping allowed.

...

Named arguments passed on to geom_events

events

Significant events or time spans - a dataframe with columns:

  • label (character) - the event label

  • start (date) - the start date, or the date of the event

  • end (date) - the end date or NA if a single event

Any grouping allowed.

A default value is defined.

mapping

a ggplot2::aes mapping. Most importantly setting the colour to something if there are multiple incidence time series in the plot

events

Significant events or time spans - a dataframe with columns:

  • label (character) - the event label

  • start (date) - the start date, or the date of the event

  • end (date) - the end date or NA if a single event

Any grouping allowed.

A default value is defined.

Value

a ggplot

Examples


data = ggoutbreak::test_poisson_rt_2class
tmp2 = data %>% poisson_locfit_model()

if(interactive()) {
  plot_growth_rate(tmp2)
}