Package: tsgc 2.0.0
tsgc: Time Series Methods Based on Growth Curves
Provides tools for modelling and forecasting epidemic trajectories using a dynamic Gompertz model within a state space framework, with the Kalman filter for robust estimation of non-linear growth. Includes a reinitialization feature to adapt to new waves, and a leading-indicator extension that uses a related series moving ahead of the variable of interest (e.g. cases ahead of hospitalisations) to improve short-horizon forecasts, with model and lag selection via rolling-origin cross-validation. Applicable to data at daily, monthly, quarterly, or annual frequency, and to non-epidemic trajectories with similar dynamics, such as innovation diffusion and product adoption. Includes functions for data preprocessing, model fitting, forecast visualization, and accuracy evaluation using standard error measures. Methods are described in Harvey and Kattuman (2020) <doi:10.1162/99608f92.828f40de>, Harvey and Kattuman (2021) <doi:10.1098/rsif.2021.0179>, and Ashby, Harvey, Kattuman, Tang, and Thamotheram (2024) <https://www.jbs.cam.ac.uk/wp-content/uploads/2024/03/cchle-tsgc-paper-2024.pdf>.
Authors:
tsgc_2.0.0.tar.gz
tsgc_2.0.0.zip(r-4.7-any)tsgc_2.0.0.zip(r-4.6-any)tsgc_2.0.0.zip(r-4.5-any)
tsgc_2.0.0.tgz(r-4.6-any)tsgc_2.0.0.tgz(r-4.5-any)
tsgc_2.0.0.tar.gz(r-4.7-any)tsgc_2.0.0.tar.gz(r-4.6-any)
tsgc_2.0.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
tsgc/json (API)
| # Install 'tsgc' in R: |
| install.packages('tsgc', repos = c('https://edwintang903.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/edwintang903/tsgc/issues
- england - Daily Covid-19 metrics for England.
- england_weather_2021 - Daily Weather data of England in 2021.
- etrading_apps - Monthly downloads of French leading apps from January 2017 to July 2021
- gauteng - Cumulative daily cases of Covid-19 in the South African province of Gauteng.
- gauteng_weather_2021 - Daily weather data of the South African province of Gauteng in 2021
- nintendo_sales - Quarterly Sales of Nintendo consoles from 2004 Q4 to 2024 Q1
- ukitaly - Cumulative daily cases of Covid-19 in Italy and UK, before 14 Dec 2020.
Last updated from:02b7bbba8a. Checks:9 OK. Indexed: yes.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel | OK | 153 | ||
| source / vignettes | OK | 206 | ||
| linux-release | OK | 167 | ||
| macos-release | OK | 208 | ||
| macos-oldrel | OK | 242 | ||
| windows-devel | OK | 109 | ||
| windows-release | OK | 166 | ||
| windows-oldrel | OK | 148 | ||
| wasm-release | OK | 108 |
Exports:argmaxas_idx_seriescross_valdf2ldldf2ldl_leadestimateestimate_r0get_timeframeget_Vidx_axis_optsidx_calendaridx_calendar_multi_stepidx_calendar_offsetidx_calendar_stepidx_cbindidx_diffidx_lagidx_ncolidx_offset_to_posidx_positionsidx_rangeidx_rbindidx_seriesidx_stepidx_step_addidx_to_dateidx_to_posidx_valuesis_idx_calendaris_idx_seriesis_idx_stepis_multi_step_patternmapesmodelKFSmulti_step_patternNCOL.idx_seriesoutputplot_compare_forecastplot_forecastplot_gy_ciplot_gy_componentsplot_holdoutplot_log_forecastplot_r0print_model_diagnosticsreinitialise_dataframeseasonalCompSSModelDynamicGompertzSSModelLeadingIndicatorwrite_resultsxts_to_idx
Dependencies:abindbase64encbslibcachemclicpp11digestdplyrevaluatefarverfastmapfontawesomefsgenericsggplot2gluegtablehighrhtmltoolsisobandjquerylibjsonlitekableExtraKFASknitrlabelinglatticelifecyclemagrittrmemoisemimepillarpkgconfigpurrrR6rappdirsRColorBrewerrlangrmarkdownrstudioapiS7sassscalesstringistringrsvglitesystemfontstextshapingtibbletidyrtidyselecttinytexutf8vctrsviridisLitewithrxfunxml2xtsyamlzoo