Package: forecast.vocs 0.9.0

Sam Abbott

forecast.vocs: Forecast Case and Sequence Notifications using Variant of Concern Strain Dynamics

Contains models and tools to produce short-term forecasts for both case and sequence notifications assuming circulation of either one or two variants. Tools are also provided to allow the evaluation of the use of sequence data for short-term forecasts in both real-world settings and in user generated scenarios.

Authors:Sam Abbott [aut, cre], Sebastian Funk [ctb]

forecast.vocs_0.9.0.tar.gz
forecast.vocs_0.9.0.zip(r-4.5)forecast.vocs_0.9.0.zip(r-4.4)forecast.vocs_0.9.0.zip(r-4.3)
forecast.vocs_0.9.0.tgz(r-4.4-any)forecast.vocs_0.9.0.tgz(r-4.3-any)
forecast.vocs_0.9.0.tar.gz(r-4.5-noble)forecast.vocs_0.9.0.tar.gz(r-4.4-noble)
forecast.vocs_0.9.0.tgz(r-4.4-emscripten)forecast.vocs_0.9.0.tgz(r-4.3-emscripten)
forecast.vocs.pdf |forecast.vocs.html
forecast.vocs/json (API)
NEWS

# Install forecast.vocs in R:
install.packages('forecast.vocs', repos = c('https://epiforecasts.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/epiforecasts/forecast.vocs/issues

Datasets:

On CRAN:

36 exports 8 stars 1.08 score 71 dependencies

Last updated 1 years agofrom:eb475ff31025f6bb1f34e2e90ce158ce902c6033

Exports:add_forecast_datesbp_launch_shinystancheck_observationsdefine_scenariosextract_forecast_datesfilter_by_availabilityforecastforecast_across_datesforecast_across_scenariosfv_as_data_listfv_dow_periodfv_examplefv_extract_forecastfv_initsfv_modelfv_posteriorfv_samplefv_score_forecastfv_tidy_posteriorgenerate_obsgenerate_obs_scenariolatest_obsplot_casesplot_defaultplot_growthplot_posteriorplot_rtplot_themeplot_voc_advantageplot_voc_fracquantiles_to_longsample_sequencessave_plotsunnest_posteriorupdate_obs_availabilityupdate_voc_label

Dependencies:abindbackportsbayesplotBHcallrcheckmateclicmdstanrcodetoolscolorspacedata.tabledescdigestdistributionaldplyrfansifarverfuturefuture.applygenericsggplot2ggridgesglobalsgluegridExtragtableinlineisobandjsonlitelabelinglatticelifecyclelistenvloomagrittrMASSMatrixmatrixStatsmgcvmunsellnlmenumDerivparallellypillarpkgbuildpkgconfigplyrposteriorprocessxpspurrrQuickJSRR6RColorBrewerRcppRcppEigenRcppParallelreshape2rlangrstanscalesStanHeadersstringistringrtensorAtibbletidyselectutf8vctrsviridisLitewithr

Model definitions

Rendered frommodel-definitions.Rmdusingknitr::rmarkdownon Jun 01 2024.

Last update: 2022-03-16
Started: 2021-10-09

Readme and manuals

Help Manual

Help pageTopics
Add the forecast dates to a plotadd_forecast_dates
Launch shinystanbp_launch_shinystan
Check a data.framecheck_dataframe
Check observations are in the correct formatcheck_observations
Check a parameter is the correct type and lengthcheck_param
Check Quantiles Required are Presentcheck_quantiles
Convert to stanfit objectconvert_to_stanfit
Define data availability scenariosdefine_scenarios
Extract posterior drawsextract_draws
Extract forecast datesextract_forecast_dates
Filter data based on availability and forecast datefilter_by_availability
Forecast using branching processes at a target dateforecast
Forecast across multiple datesforecast_across_dates
Forecast across multiple scenarios and datesforecast_across_scenarios
Forecast for a single model and summariseforecast_n_strain
Format data for use with stanfv_as_data_list
Calculate the day of the week periodicityfv_dow_period
Load a package examplefv_example
Extract forecasts from a summarised posteriorfv_extract_forecast
Set up initial conditions for modelfv_inits
Load and compile a strain modelfv_model
Summarise the posteriorfv_posterior
Fit a brancing process strain modelfv_sample
Evaluate forecasts using proper scoring rulesfv_score_forecast
Summarise the posterior tidilyfv_tidy_posterior
Generate Simulated Observationsgenerate_obs
Define observed data for a scenariogenerate_obs_scenario
Test positive COVID-19 cases and sequences in Germanygermany_covid19_delta_obs
Filter for latest observations of all typeslatest_obs
Link dates by time for posterior parameter estimateslink_dates_with_posterior
Link posterior estimates with observed datalink_obs_with_posterior
Calculate piecewise stepspiecewise_steps
Plot the posterior prediction for casesplot_cases
Default posterior plotplot_default
Plot the posterior prediction for the growth rateplot_growth
Pairs plot of parameters of interest and fitting diagnosticsplot_pairs
Plot posterior predictionsplot_posterior
Plot the posterior prediction for the reproduction numberplot_rt
Add the default plot themeplot_theme
Plot the posterior prediction for the transmission advantage for the variant of concernplot_voc_advantage
Plot the population posterior prediction for the fraction of samples with the variant of concernplot_voc_frac
Plot method for forecastplot.fv_forecast
Plot method for fv_tidy_posteriorplot.fv_posterior
Print method for fv_tidy_posteriorprint.fv_posterior
Convert summarised quantiles from wide to long formatquantiles_to_long
Sample Sequence Observation Modelsample_sequences
Save plots by namesave_plots
Summary method for forecastsummary.fv_forecast
Summary method for fv_tidy_posteriorsummary.fv_posterior
Unnest posterior estimates from a forecast data.frameunnest_posterior
Update observations based on availabilityupdate_obs_availability
Label the Variant of Concernupdate_voc_label