Skip to contents

Helper function to calculate various size requirements

Usage

.calculate_ns(
  reporting_triangle,
  max_delay,
  scale_factor,
  n_min_retro_nowcasts
)

Arguments

reporting_triangle

Matrix of the reporting triangle, with rows representing the time points of reference and columns representing the delays. Can be a reporting matrix or incomplete reporting matrix. Can also be a ragged reporting triangle, where multiple columns are reported for the same row. (e.g. weekly reporting of daily data).

max_delay

Integer indicating the maximum delay to estimate, in units of the delay. The default is to use the whole reporting triangle, ncol(reporting_triangle) -1.

scale_factor

Numeric value indicating the multiplicative factor on the maximum delay to be used for estimation of delay and uncertainty. Default is 3.

n_min_retro_nowcasts

Integer indicating the minimum number of reference times needed for uncertainty estimation. Default is 2.

Value

list of the integer sizes