Description Usage Arguments Value
Given a set of sampled trajectories for future disease incidence, preprocess them in preparation for using them to generate forecast samples for short-term and seasonal incidence targets.
1 2 3 4 | preprocess_and_augment_trajectory_samples(trajectory_samples, round_digits,
obs_data_matrix, obs_data, prediction_target_var, first_season_obs_ind,
analysis_time_ind = nrow(obs_data), analysis_time_season,
analysis_time_epiweek, region, seasonal_target_week_limits)
|
trajectory_samples |
an n by h matrix of sampled incidence trajectories; Each sampled trajectory is for the next h weeks. There are n trajectories |
round_digits |
number of digits to which incidence will be rounded |
obs_data |
a data frame containing observed incidence so far this season; at a minimum, must contain two columns: season_week, indicating the week of the current disease season, and the column given in prediction_target_var |
prediction_target_var |
character specifying column name in obs_data for which we are generating predictions. |
first_season_obs_ind |
index of row in obs_data for the first week of the season for which we are generating predictions. |
analysis_time_ind |
index of row in obs_data that contains the most recent observation of incidence (default nrow(obs_data)) |
analysis_time_season |
in format 2018/2019 |
analysis_time_epiweek |
in format 201840 |
seasonal_target_week_limits |
vector of length 2 specifying season weeks that will be used for identifying seasonal targets such as peak incidence; sampled or observed incidence outside of this range will be set to NA. |
an n by W matrix of preprocessed trajectory samples, where W = (# of weeks observed so far this season) + h
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.