truncate_to_rows: Truncate reporting triangle by removing bottom rows
Description
Generates a list of retrospective reporting triangles by successively
removing rows from the bottom of the original triangle.
Each truncated triangle represents what would have been observed at an
earlier reference time.
This function truncates row(s) of the reporting triangle, removing the most
recent observations (starting from the bottom of the reporting triangle).
trunc_rep_tri_list List of n truncated reporting_triangle
objects with as many rows as available given the truncation, and the same
number of columns as the input reporting_triangle.
Arguments
reporting_triangle
A reporting_triangle object with rows
representing reference times and columns representing 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).
n
Integer indicating the number of retrospective
truncated triangles to be generated, always starting from the most
recent reference time. Default is to generate truncated matrices for
each row up until there are insufficient rows to generate nowcasts
from, where the minimum requirement is one more than the number of
horizon rows (rows containing NAs).
validate
Logical. If TRUE (default), validates the object. Set to
FALSE only when called from functions that already validated.
See Also
Retrospective data generation functions
apply_reporting_structure(),
apply_reporting_structures(),
truncate_to_row()