Skip to contents

Plot the epidemic curve and fitted serial interval distribution

Usage

plot_si_fit(
  dat,
  mean,
  sd,
  weights,
  dist = "normal",
  scaling_factor = 1,
  x_scale = 0.04
)

Arguments

dat

data frame containing a variable x with index case to case (ICC) intervals

mean

mean of serial interval distribution

sd

standard deviation of serial interval distribution

weights

numeric vector of weights based on transmission route

dist

string; assumed distribution of the serial interval; takes "normal" or "gamma"; defaults to "normal".

scaling_factor

numeric; scales the density to better match the height of the histogram; defaults to 1.

x_scale

numeric; scaling factor to control where the mean value is labelled along the x-axis. The mean value is positioned at mean + (max(dat) * x_scale).

Value

ggplot object