Skip to contents

All functions

allocate_reference_times()
Allocate training volume based on combination of defaults and user-specified values for training volume for delay and uncertainty estimation.
apply_delay()
Apply the delay to generate a point nowcast
as_reporting_triangle()
Create a reporting_triangle object
as_reporting_triangle(<data.frame>)
Create a reporting_triangle object from a data.frame
as_reporting_triangle(<matrix>)
Create a reporting_triangle from a matrix
assert_baselinenowcast_df()
Assert validity of baselinenowcast_df objects
assert_reporting_triangle()
Assert validity of reporting_triangle objects
baselinenowcast()
Generate a nowcast
baselinenowcast(<reporting_triangle>)
Create a dataframe of nowcast results from a single reporting triangle
baselinenowcast_df-class baselinenowcast_df
Nowcast Data.frame Object
combine_obs_with_pred()
Combine observed data with a single prediction draw
construct_triangle()
Generate a single retrospective reporting triangle
construct_triangles()
Generate retrospective reporting triangles
detect_structure()
Detect the structure of a reporting triangle
.apply_mask()
Apply mask to extract the elements of the matrix that are both true
.assign_allocation_from_ns()
Assign number of reference times to delay and uncertainty from the sizes
.calc_n_retro_nowcast_times()
Calculate the number of retrospective nowcast times that can be used after aggregating
.calculate_ns()
Helper function to calculate various size requirements
.check_against_requirements()
Check target size against number of reference times available and the number required
.check_lhs_not_only_zeros()
Check if there are non-zero-values on the LHS of NAs
.check_obs_and_pred()
Check observations and predictions are compatible
.check_to_filter_to_max_delay()
Check that the reporting triangle contains the correct number of columns for the specified maximum delay
.filter_to_recent_horizons()
Filter to recent horizons
.handle_target_exceeds_avail()
Helper for when target exceeds available reference times
.perform_allocation_process()
Perform the allocation process
.safelydoesit()
Safe iterator
.validate_delay()
Validate the delay PMF if it is passed in
.validate_inputs_allocation()
Helper function to validate allocation parameters
.validate_inputs_uncertainty()
Validate the specified number of reference times meets the minimum requirements
.validate_max_delay()
Check that the maximum delay is not too large, error if it is
.validate_rep_tri_args()
Validate each item in the reporting triangle
.validate_rep_tri_df()
Validate the reporting triangle data.frame
.validate_uncertainty()
Validate the uncertainty parameters if they are passed in
estimate_and_apply_delay()
Estimate and apply delay from a reporting triangle
estimate_and_apply_uncertainty()
Estimate and apply uncertainty to a point nowcast matrix
estimate_delay()
Estimate a delay distribution from a reporting triangle
estimate_uncertainty()
Estimate uncertainty parameters
fill_triangle()
Generate point nowcast
fill_triangles()
Generate retrospective nowcasts
fit_by_horizon()
Helper function that fits its each column of the matrix (horizon) to an observation model.
fit_nb()
Fit a negative binomial to a vector of observations and expectations
new_baselinenowcast_df()
Combine data from a nowcast dataframe, strata, and reference dates
new_reporting_triangle()
Class constructor for reporting_triangle objects
reporting_triangle-class reporting_triangle
Reporting Triangle Object
sample_nb()
Sample from negative binomial model given a set of predictions
sample_nowcast()
Generate a single draw of a nowcast combining observed and predicted values
sample_nowcasts()
Generate multiple draws of a nowcast combining observed and predicted values
sample_prediction()
Get a draw of only the predicted elements of the nowcast vector
sample_predictions()
Get a dataframe of multiple draws of only the predicted elements of the nowcast vector
syn_nssp_df
A synthetic dataset containing the number of incident cases indexed by reference date and report date. While data of this form could be from any source, this data is meant to represent the output of pre-processing the syn_nssp_line_list dataset, which is a synthetic patient-level line list data from the United State's National Syndromic Surveillance System (NSSP).
syn_nssp_line_list
A synthetic dataset resembling line-list (each row is a patient) data from the United States' National Syndromic Surveillance System (NSSP) accessed via the Essence platform. All entries are synthetic, formatted to look as close to the real raw data as possible.
truncate_triangle()
Get a single truncated triangle
truncate_triangles()
Generate truncated reporting triangles