Description Usage Arguments Value
for a given season using a predictive method that works by simulating trajectories of incidence in each remaining week of the season. Results are stored in a data frame, saved in a .rds file with a name like "model_name-region-season-loso-predictions.rds" Results have columns indicating the analysis time season and season week, model name, log scores for each prediction target, the "log score" used in the competition (adding probabilities from adjacent bins) for each prediction target, as well as the log of the probability assigned to each bin.
1 2 3 4 5 | get_submission_via_trajectory_simulation(data, analysis_time_season,
first_analysis_time_season_week = 10, last_analysis_time_season_week = 41,
prediction_target_var, incidence_bins, incidence_bin_names, n_trajectory_sims,
simulate_trajectories_function, simulate_trajectories_params,
all_regions = c("National", paste0("Region ", 1:10)))
|
data |
data frame with observed disease data available to use for predictions |
analysis_time_season |
character vector of length 1 specifying the season to obtain predictions for, in the format "2000/2001" |
first_analysis_time_season_week |
integer specifying the first week of the season in which to make predictions, using all data up to and including that week to make predictions for each following week in the season |
last_analysis_time_season_week |
integer specifying the last week of the season in which to make predictions, using all data up to and including that week to make predictions for each following week in the season |
prediction_target_var |
string specifying the name of the variable in data for which we want to make predictions |
incidence_bins |
a data frame with variables lower and upper defining lower and upper endpoints to use in binning incidence |
incidence_bin_names |
a character vector with a name for each incidence bin |
n_trajectory_sims |
integer number of trajectories to simulate |
simulate_trajectories_function |
a function to call to simulate incidence trajectories. It will be called with the following arguments: * n_sims = number of trajectories to simulate * max_prediction_horizon = number of following weeks to simulate * data = all available data to use in doing simulation, up to and including the analysis time * region = region * analysis_time_season = analysis_time_season * analysis_time_season_week = week of the season at which we are making the predictions * params = simulate_trajectories_params; additional user-provided parameters |
simulate_trajectories_params |
optional additional parameters to pass to simulate_trajectories_function |
all_regions |
a character vector with all of the regions over which to make forecasts, defaults to HHS region names |
data frame with contents suitable for writing out as a csv file in the CDC's standardized format
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.