code for cdc flu contest 2017-2018

assemble_predictions | Assemble leave-one-season-out or test phase predictions made... |

assemble_stacking_inputs | Assemble a data frame of inputs to stacking |

calc_median_from_binned_probs | Calcluation of median value from binned probability... |

cdcFlu20172018 | cdcFlu20172018 - Code and submissions for 2017-2018 CDC flu... |

compute_competition_log_score | Calculate "log scores" for the purpose of the competition -... |

download_and_preprocess_flu_data | Download and preprocess the latest CDC flu data, both... |

download_and_preprocess_state_flu_data | Download and preprocess the latest CDC flu data, state-level |

fit_kde_log_peak_week_inc | Estimate KDE for LOG peak week incidence |

fit_kde_onset_week | Estimate KDE for onset week |

fit_kde_peak_week | Estimate KDE for peak week |

fit_kde_weekly_inc | Fit a GAM for weekly incidence |

fit_kernel_smoothed_stacked_model_fixed_bw | Estimate weights for a linear combination of predictive... |

fit_region_kdes | Fits and saves KDE models for all region-year combinations |

fit_region_sarima | Estimate SARIMA model using data up to but not including... |

fit_stacked_model | Fit a stacking model that assigns weights to component models... |

fit_unregularized_stacked_model | Estimate "optimal" unregularized weights for a linear... |

flu_data | Influenza incidence in the US (1997 - 2016) |

flu_onset_baselines | Flu season "onset thresholds" from the US CDC. |

get_inc_bin | return the bin name for a given incidence |

get_initial_rng_substream | Get the initial rng substream for an rstream object. Should... |

get_log_scores_via_direct_simulation | Get log scores and full predictive distributions for each... |

get_log_scores_via_trajectory_simulation | Get log scores and full predictive distributions for each... |

get_num_MMWR_weeks_in_first_season_year | return integer that's either 52 or 53: number of weeks in the... |

get_num_MMWR_weeks_in_year | return integer that's either 52 or 53: number of MMWR weeks... |

get_observed_seasonal_quantities | Compute season onset, peak week, and peak incidence |

get_official_observed_seasonal_quantities | Compute season onset, peak week, and peak incidence |

get_onset_baseline | Get the onset baseline for a combination of region and season |

get_onset_week | Utility function to compute onset week based on a trajectory... |

get_partially_revised_ilinet | Wrapper function around epiforecast::mimicPastEpidataDF to... |

get_rng_substream | Get the rng substream for an rstream object corresponding to... |

get_submission_one_region_via_trajectory_simulation | Get log scores and full predictive distributions for each... |

get_submission_via_trajectory_simulation | Get log scores and full predictive distributions for each... |

logspace_add | Calculate log(exp(logx) + exp(logy)) in a somewhat... |

logspace_sub | Calculate log(exp(logx) - exp(logy)) in a somewhat... |

logspace_sub_matrix_rows | Calculate logspace difference of matrix rows in a somewhat... |

logspace_sum | Calculate log(sum(exp(logx))) in a somewhat numerically... |

logspace_sum_matrix_rows | Calculate logspace summation of matrix rows in a somewhat... |

make_one_kde_prediction_file | Wrapper for prediction of a single time-point from KDE fits |

make_predictions_dataframe | Helper function to standardize creation of empty prediction... |

make_predictions_plots | Make plots of prediction submissions for flu contest: so far,... |

my_plot_weekahead | Plots Week Ahead Forecasts |

predict_kde_log_peak_week_inc | Compute predictive distribution for peak week incidence from... |

predict_kde_log_weekly_inc | Compute predictive distribution for weekly incidence from GAM... |

predict_kde_onset_week | Functions for predicting from KDE fits |

predict_kde_peak_week | Compute predictive distribution for peak week from KDE fit |

predict_region_kde | Wrapper for prediction and evaluation of KDE fits |

sample_predictive_trajectories_arima | Simulate predictive trajectories from an ARIMA model |

sample_predictive_trajectories_arima_wrapper | A wrapper around sample_predictive_trajectories_arima... |

season_week_to_year_week | Convert season week to year week |

simulate_trajectories_kcde | Simulate predictive distributions from KCDE/copulas model;... |

weighted_combine_predictions | Compute a weighted combination of prediction results |

year_week_to_season_week | Convert year week to season week |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.