Learn R Programming

baselinenowcast (version 0.2.0)

example_downward_corr_rt: Example reporting triangle with downward corrections

Description

A reporting_triangle object demonstrating how to handle systematic downward corrections in reporting data. This represents a realistic case where data quality reviews at delay 2 consistently identify false positives or reclassify cases, producing negative values at that specific delay.

Usage

example_downward_corr_rt

Arguments

Format

A reporting_triangle object with 8 reference dates and 4 delays:

reporting_triangle_matrix

8x4 matrix with negative values at delay 2

reference_dates

8 dates starting from 2024-01-01

delays_unit

"days"

Details

Use this example to understand:

  • How to work with negative corrections in delay distributions

  • The impact of preprocessing negative values on delay estimation

  • How PMFs and CDFs behave with systematic downward corrections

See Also

  • example_reporting_triangle for a clean example without corrections

  • baselinenowcast.reporting_triangle() specifically the preprocess argument for a description of how to remove negative values if desired.

Example datasets example_reporting_triangle, germany_covid19_hosp, syn_nssp_df, syn_nssp_line_list

Examples

Run this code
# View the example triangle with downward corrections
example_downward_corr_rt

# Estimate delay with and without preprocessing
delay_raw <- estimate_delay(example_downward_corr_rt, n = 5)
delay_processed <- estimate_delay(
  preprocess_negative_values(example_downward_corr_rt),
  n = 5
)

# Compare the resulting PMFs
delay_raw
delay_processed

Run the code above in your browser using DataLab