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>.

Version: 2.0.0
Depends: R (≥ 3.5.0)
Imports: KFAS, xts, ggplot2 (≥ 3.5.0), zoo, magrittr, tidyr, methods, abind, purrr, scales, kableExtra
Suggests: ggfortify, knitr, RColorBrewer, rmarkdown, ggforce, gridExtra, latex2exp, here, testthat, dplyr, ggthemes
Published: 2026-09-01
DOI: 10.32614/CRAN.package.tsgc
Author: Michael Ashby [aut, cre], Paul Kattuman [aut], Andrew Harvey [aut], Edwin Tang [aut], Craig Thamotheram [aut], Guglielmo Secchi [aut], Cambridge Centre for Health Leadership & Enterprise, Cambridge Judge Business School, University of Cambridge [fnd], UK Health Security Agency [fnd], Keynes Fund, Faculty of Economics, University of Cambridge [fnd] (Supported A. Harvey), University of Cambridge Social Science Impact Fund [fnd] (Supported P. Kattuman), Cambridge Mathematics Placements Programme, University of Cambridge [fnd] (Supported E. Tang), Caldecott Bursary Fund, Magdalene College, University of Cambridge [fnd] (Supported E. Tang), Chancellor's Scholarship Scheme, University of Warwick [fnd] (Supported E. Tang), Statistics Centre for Doctoral Training, University of Warwick [fnd] (Supported E. Tang)
Maintainer: Michael Ashby <mwa22 at cam.ac.uk>
BugReports: https://github.com/edwintang903/tsgc/issues
License: GPL (≥ 3)
URL: https://github.com/edwintang903/tsgc
NeedsCompilation: no
Materials: README, NEWS
In views: TimeSeries
CRAN checks: tsgc results

Documentation:

Reference manual: tsgc.html , tsgc.pdf
Vignettes: Forecasting epidemic trajectories: Time Series Growth Curves package 'tsgc' (source, R code)

Downloads:

Package source: tsgc_2.0.0.tar.gz
Windows binaries: r-devel: tsgc_0.0.zip, r-release: tsgc_0.0.zip, r-oldrel: tsgc_0.0.zip
macOS binaries: r-release (arm64): tsgc_2.0.0.tgz, r-oldrel (arm64): tsgc_2.0.0.tgz, r-release (x86_64): tsgc_2.0.0.tgz, r-oldrel (x86_64): tsgc_2.0.0.tgz
Old sources: tsgc archive

Linking:

Please use the canonical form https://CRAN.R-project.org/package=tsgc to link to this page.