Utility function for filtering and estimating

filter_and_estimate(
  incidence,
  n_resample,
  level = 0.95,
  shift_amt = 0,
  n = 7,
  hide_invalid = TRUE
)

Arguments

incidence

incidence timeseries, vector

n_resample

number of bootstrapping attempts for confidence interval estimation

level

confidence interval level

shift_amt

number of timesteps to shift estimation back by (integer)

n

number of timesteps to filter (longer is smoother), must be odd

hide_invalid

whether or not to return NA for the first/last n-1 times

Value

dataframe with estimated r(t)