Skip to contents

Simple forecasters

Complete forecasters that produce reasonable baselines

arx_forecaster()
Direct autoregressive forecaster with covariates
cdc_baseline_forecaster()
Predict the future with the most recent value
flatline_forecaster()
Predict the future with today's value
arx_classifier()
Direct autoregressive classifier with covariates

Forecaster modifications

Constructors to modify forecaster arguments and utilities to produce epi_workflow objects

arx_args_list()
ARX forecaster argument constructor
arx_class_args_list()
ARX classifier argument constructor
cdc_baseline_args_list()
CDC baseline forecaster argument constructor
flatline_args_list()
Flatline forecaster argument constructor
arx_class_epi_workflow()
Create a template arx_classifier workflow
arx_fcast_epi_workflow()
Create a template arx_forecaster workflow

Helper functions for Hub submission

flusight_hub_formatter()
Format predictions for submission to FluSight forecast Hub

Parsnip engines

Prediction methods not available elsewhere

quantile_reg()
Quantile regression
smooth_quantile_reg()
Smooth quantile regression
grf_quantiles
Random quantile forests via grf

Custom panel data forecasting workflows

epi_recipe()
Create a epi_recipe for preprocessing data
epi_workflow()
Create an epi_workflow
add_epi_recipe() remove_epi_recipe() update_epi_recipe()
Add an epi_recipe to a workflow
adjust_epi_recipe()
Adjust a step in an epi_workflow or epi_recipe
Add_model() Remove_model() Update_model() add_model() remove_model() update_model()
Add a model to an epi_workflow
predict(<epi_workflow>)
Predict from an epi_workflow
fit(<epi_workflow>)
Fit an epi_workflow object
augment(<epi_workflow>)
Augment data with predictions
forecast(<epi_workflow>)
Produce a forecast from an epi workflow

Epi recipe preprocessing steps

step_epi_naomit()
Unified NA omission wrapper function for recipes
step_epi_lag() step_epi_ahead()
Create a shifted predictor
step_epi_slide()
Calculate a rolling window transformation
step_growth_rate()
Calculate a growth rate
step_lag_difference()
Calculate a lagged difference
step_population_scaling()
Convert raw scale predictions to per-capita
step_training_window()
Limits the size of the training window to the most recent observations

Epi recipe verification checks

check_enough_train_data()
Check the dataset contains enough data points.

Forecast postprocessing

Create a series of postprocessing operations

frosting()
Create frosting for postprocessing predictions
add_frosting() remove_frosting() update_frosting()
Add frosting to a workflow
adjust_frosting()
Adjust a layer in an epi_workflow or frosting
apply_frosting()
Apply postprocessing to a fitted workflow
extract_frosting()
Extract the frosting object from a workflow
get_test_data()
Get test data for prediction based on longest lag period
tidy(<frosting>)
Tidy the result of a frosting object

Frosting layers

add_layer()
Add layer to a frosting object
extract_layers() is_layer() validate_layer() detect_layer()
Extract, validate, or detect layers of frosting
layer_add_forecast_date()
Postprocessing step to add the forecast date
layer_add_target_date()
Postprocessing step to add the target date
layer_cdc_flatline_quantiles()
CDC Flatline Forecast Quantiles
layer_naomit()
Omit NAs from predictions or other columns
layer_point_from_distn()
Converts distributional forecasts to point forecasts
layer_population_scaling()
Convert per-capita predictions to raw scale
layer_predict()
Prediction layer for postprocessing
layer_predictive_distn()
Returns predictive distributions
layer_quantile_distn()
Returns predictive quantiles
layer_residual_quantiles()
Creates predictions based on residual quantiles
layer_threshold()
Lower and upper thresholds for predicted values
layer_unnest()
Unnest prediction list-cols
update(<layer>)
Update post-processing layer
slather()
Spread a layer of frosting on a fitted workflow

Automatic forecast visualization

autoplot(<epi_workflow>) autoplot(<canned_epipred>)
Automatically plot an epi_workflow or canned_epipred object

Utilities for quantile distribution processing

dist_quantiles()
A distribution parameterized by a set of quantiles
extrapolate_quantiles()
Summarize a distribution with a set of quantiles
nested_quantiles()
Turn a vector of quantile distributions into a list-col
weighted_interval_score()
Compute weighted interval score
pivot_quantiles_longer()
Pivot columns containing dist_quantile longer
pivot_quantiles_wider()
Pivot columns containing dist_quantile wider

Other utilities

clean_f_name()
Create short function names

Included datasets

case_death_rate_subset
Subset of JHU daily state cases and deaths
state_census
State population data
grad_employ_subset
Subset of Statistics Canada median employment income for postsecondary graduates