Time Series Methods Based on Growth Curves
- CRAN checks, method
Method
Checks and health
CRAN runs every current package through
R CMD checkon a set of machines and publishes a result for each one. The health shown on a package page comes from these results alone.- Problems
- Notes alone never count against a package, but a warning, an error or a failure on any platform is a problem. Open CRAN deadlines are a fact of their own, shown as a clock after the mark, so the mark always says what the checks found.
- Checks only
- Health reflects CRAN's check results and nothing else. Even a package with no tests, no coverage or no recent release can have every platform OK.
- Once a day
- Results are collected once a day from files CRAN publishes. Each platform is one machine set-up, named by its R version, operating system, architecture and compiler, such as r-devel-linux-x86_64-fedora-clang.
- Platforms counted
- The 13 in 3 of 13 is the number of platform rows CRAN published for that package on the day of collection. The set of machines changes over time, so the number is not fixed, and a package missing from a platform counts as neither passing nor failing there.
- All OK13 platforms
- CRAN 30-day downloads, method
- 293−34.7% down on the 30 days before, the worse direction
- Dependent packages, method
Method
Reverse dependencies
Dependent packages are other packages that list this one under
Depends,ImportsorLinkingToin theirDESCRIPTIONfile. Those fields list the packages a package needs to install, so dependents break if this one is archived or broken.- As declared
- The counts follow the declarations as written, not whether a package uses the other one when it runs.
- Suggests apart
- Packages that list this one only under
Suggestsinstall and run without it, and use it for tests, examples or an optional feature. They are counted as Suggested by, never among the dependents, and a package that also lists it under one of the three fields is a dependent and is not counted again. - Zero
- Zero dependents means no current CRAN package declares a need for this one, though some may suggest it. On 29 Oct 2026, 19,585 of the 25,593 current CRAN packages had no dependent package.
- 0none suggest it
- Test coverage, method
Method
Test coverage
Test coverage is measured by downloading each CRAN package's current source file, installing its dependencies, building it and running its tests under covr.
- Almost half of CRAN has no tests to run
- Only CRAN packages are measured. Many have no percentage, most often because the package has no tests, and that blank is a recorded outcome, not missing data.
- NOT_CRAN
- Tests run with NOT_CRAN=true, so tests that skip themselves on CRAN run here, and the figure can differ from what CRAN's own checks see.
- Current version only
- Only the current version is measured, and a new version on CRAN is measured again. Older rows are kept but never filled in later. This is one package's run.
- Never 0%
- On a package page three states stay apart: measured, no tests, and not measured. Neither of the last two is ever shown as 0%.
- 90%of lines run by tests
- Advisories, method
Method
Security advisories
Advisories come from the R Consortium advisory database, a community record of security problems in R packages, as OSV publishes it.
- The copy
- The record is read once a day. The data is published under the Apache License 2.0 and is credited on the advisories list.
- Box under the name
- Under the package's name, a box names any advisory that affects the current release, with its fix or that there is none.
- Ranges
- Advisories state ranges, such as from 0.9.12 up to but not including 1.8.8. Each range is checked against every version CRAN has published, using the version rules R itself uses, so a release that came out after the advisory was written is still caught by its range.
- Not the package
- The rating is for the library flaw itself, not for how exposed the R package is, and it is never added up into a figure for the package.
- None known
About
Method, About Method Licence figures come from the Licences
License field of each package's DESCRIPTION file, read the way R itself reads it. No licence file is opened.tools::analyze_license() and R's own licence database, as CRAN's checks read it.| is read, so one string can offer two families.
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.
Full description
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>.
- Maintainer
- Michael Ashby
- Licence
- GPL (>= 3)
- Latest release
- 1 Sep 2026
- First release
- 26 Aug 2024
More details
- Releases
- 2
- Needs compilation
- No
- Needs R
- >= 3.5.0
- Config/roxygen2/version
- 8.0.0
- Config/testthat/edition
- 3
- LazyData
- true
- RoxygenNote
- 7.3.3
Task views (1)
Subjects (1) Method, SubjectsMethod
Subjects and collections
Subjects are the site's own grouping of CRAN packages, found by clustering. Collections are sets of packages that communities declare, such as the tidyverse.
- Subjects
- Subjects are found by clustering the words of current CRAN packages and the packages they use. No one edits them by hand.
- Collections
- Collections are sets that communities declare, through a package that installs the set or an organization on GitHub. The site finds them by rules.
- Who made each
- Subjects are marked Site and collections Community. Subjects, collections and task views are never mixed in one list.
- The day of the data
- Subjects and collections were last worked out on 22 Oct 2026.
Cite
Package
Run in R for the authors' preferred citation:
citation("tsgc")Ashby, M., Caldecott Bursary Fund, Magdalene College, University of Cambridge, Cambridge Centre for Health Leadership & Enterprise, Cambridge Judge Business School, University of Cambridge, Cambridge Mathematics Placements Programme, University of Cambridge, Chancellor's Scholarship Scheme, University of Warwick, Keynes Fund, Faculty of Economics, University of Cambridge, Statistics Centre for Doctoral Training, University of Warwick, UK Health Security Agency, University of Cambridge Social Science Impact Fund, Harvey, A., Kattuman, P., Secchi, G., Tang, E., & Thamotheram, C. (2026). tsgc: Time Series Methods Based on Growth Curves (Version 2.0.0) [Computer software]. https://doi.org/10.32614/CRAN.package.tsgc
About
This package has no citation file, so citation() returns this entry built from DESCRIPTION.
R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
Balamuta, J. J. (2026). R Observatory: Metrics for tsgc version 2.0.0 [Data set]. HJJB, LLC. Data release v2026-10-29. https://doi.org/10.5281/zenodo.21843040
About
From data release v2026-10-29, which the citation names so these numbers can be found later.
Health
All 13 check platforms pass.
r-devel-linux-x86_64-debian-clangThe unreleased R on Linux, x86_64, debian-clang
OK
- Version checked
- 2.0.0
- Time taken
- 226 s
r-devel-linux-x86_64-debian-gccThe unreleased R on Linux, x86_64, debian-gcc
OK
- Version checked
- 2.0.0
- Time taken
- 152 s
r-devel-linux-x86_64-fedora-clangThe unreleased R on Linux, x86_64, fedora-clang
OK
- Version checked
- 2.0.0
- Time taken
- 146 s
r-devel-linux-x86_64-fedora-gccThe unreleased R on Linux, x86_64, fedora-gcc
OK
- Version checked
- 2.0.0
- Time taken
- 149 s
r-devel-windows-x86_64The unreleased R on Windows, x86_64
OK
- Version checked
- 2.0.0
- Time taken
- 268 s
r-oldrel-macos-arm64The previous release of R on macOS, arm64
OK
- Version checked
- 2.0.0
- Time taken
- 56 s
r-oldrel-macos-x86_64The previous release of R on macOS, x86_64
OK
- Version checked
- 2.0.0
- Time taken
- 235 s
r-oldrel-windows-x86_64The previous release of R on Windows, x86_64
OK
- Version checked
- 2.0.0
- Time taken
- 310 s
r-patched-linux-x86_64The patched release of R on Linux, x86_64
OK
- Version checked
- 2.0.0
- Time taken
- 216 s
r-release-linux-x86_64The current release of R on Linux, x86_64
OK
- Version checked
- 2.0.0
- Time taken
- 213 s
r-release-macos-arm64The current release of R on macOS, arm64
OK
- Version checked
- 2.0.0
- Time taken
- 55 s
r-release-macos-x86_64The current release of R on macOS, x86_64
OK
- Version checked
- 2.0.0
- Time taken
- 257 s
r-release-windows-x86_64The current release of R on Windows, x86_64
OK
- Version checked
- 2.0.0
- Time taken
- 251 s
- 13 OK
Over time
No change since 4 Aug 2026
As a list (5)
| Changed | Worst status | OK | Notes | Warnings | Errors |
|---|---|---|---|---|---|
| 4 Aug 2026 | OK | 13 | 0 | 0 | 0 |
| 1 Aug 2026 | Note | 12 | 1 | 0 | 0 |
| 9 Jun 2026 | OK | 13 | 0 | 0 | 0 |
| 8 Jun 2026 | Error | 12 | 0 | 0 | 1 |
| 10 Mar 2026 | OK | 14 | 0 | 0 | 0 |
Since March 2026
Downloads
Method, Downloads Method Download figures count requests logged by each distribution channel. They are not counts of installs or of users, because each channel publishes its own totals and this site reads them.Downloads
- Total downloads in the last 30 days
- 310−33.9% down on the 30 days before, the worse directionIt is the sum of 3 channels: CRAN, r2u and autoCRAN.
CRAN rank
14,494 of 26,553
CRAN
293 downloads in the last 30 days
- Rank
- 14,494 of 26,553
- Change
- −34.7% down on the 30 days before, the worse direction
It is in the total. Take it out
r2u
14 downloads in the last 30 days
- Rank
- 5,640 of 30,526
- Change
- +100% up on the 30 days before, the better direction
It is in the total. Take it out
autoCRAN
3 downloads in the last 30 days
- Rank
- 18,475 of 29,233
- Change
- −76.9% down on the 30 days before, the worse direction
It is in the total. Take it out
The total is 310 downloads in the last 30 days. It is the sum of 3 channels: CRAN, r2u and autoCRAN.
Over time
Dependencies
Code
Method, Code Method Code metrics come from reading the released source of each package version. The package is never installed, loaded or run.Code metrics
README, vignettes, a NEWS file and the shares read from its help pages. Files kept only in the repository, such as a pkgdown configuration or CI files, are read by the repository scan instead.
- Functions
- 104
- Public exports
- 51
- Lines of R code
- 6,621
- Median complexity
- 2.5
Functions (104)
Size and composition
Lines by kind (19,393)
| Kind | Lines | Share |
|---|---|---|
| R code | 6,621 | 34% |
| Tests | 4,583 | 24% |
| Documentation | 3,521 | 18% |
| Guides | 4,668 | 24% |
Lines by language
| Language | Lines | Share |
|---|---|---|
| R | 13,731 | 71% |
| Rd | 3,521 | 18% |
| Vignettes | 2,022 | 10% |
| Other | 119 | 0.6% |
Languages are counted from file extensions.
- Files
- 127
- R functions
- 104
- Object systems
- S3: 21 methods, Reference classes: 4 classes
Complexity
- Median
- 2.5
- Mean
- 4.38
- Highest
- 26
- Median lines per function
- 10
About complexity
Cyclomatic complexity counts the independent paths through a function: 1 is a straight line, higher is harder to test. R functions only.
Call graph figures
- R functions
- 104
- Calls
- 240
- Unconnected
- 24
- Groups
- 1
Growth (2 releases)
Release changes
Tests
The tests ran and coverage was measured.
- Lines run by tests
- 90.5%
- Expressions run by tests
- 90.1%
- Test cases
- 337
- Exports named in tests
- 100%
Coverage by file (9)
Coverage run
- Lines counted
- 3,016
- Lines the tests ran
- 2,729
- Tests passed
- Yes
- Measured with
- covr 3.6.5 on R 4.6.1
Test suite
- Has tests
- Yes
- Test frameworks
- testthat
- Test cases
- 337
- Lines of tests
- 4,583
- Test lines per line of code
- 0.69
Documentation
- Exports documented
- 100%
- Arguments documented
- 92.3%
- Return value documented
- 92.2%
- Help pages with examples
- 55.8%
- Examples run in checks
- 100%
Other documentation
- README
- Yes, 606 words
- Release notes file
- Yes
- Help pages
- 86
- Lines of documentation
- 3,521
Datasets
Method, Datasets Method The datasets inside packages are read from their R objects in datasets
data/ folders when the code is analysed. Each object is described by its class, its shape and its columns, and fingerprinted so the same data can be found in other packages.data() are listed, 76,182 on CRAN and 8,045 on Bioconductor, so the list is not every file in data/.
| Dataset | Size |
|---|---|
| englandDaily Covid-19 metrics for England. | 733 × 4 |
| england_ | 365 × 5 |
| etrading_ | 55 × 5 |
| gautengCumulative daily cases of Covid-19 in the South African province of Gauteng. | 667 × 1 |
| gauteng_ | 365 × 5 |
| nintendo_ | 78 × 8 |
| ukitalyCumulative daily cases of Covid-19 in Italy and UK, before 14 Dec 2020. | 294 × 2 |
People
Method, People Method People on the site are the names packages give them in their Author and maintainer identity
DESCRIPTION files: authors from the author list, and the maintainer from the Maintainer field. Spellings of one name become one person only where the rules below allow it, and when in doubt the rules keep people apart.
Maintainer since 2.0.0 (2026), previously Craig Thamotheram (0.0), author
Author
Author
Author
Author
Author
Funded by Caldecott Bursary Fund, Magdalene College, University of Cambridge, Cambridge Centre for Health Leadership & Enterprise, Cambridge Judge Business School, University of Cambridge, Cambridge Mathematics Placements Programme, University of Cambridge, Chancellor's Scholarship Scheme, University of Warwick, Keynes Fund, Faculty of Economics, University of Cambridge, Statistics Centre for Doctoral Training, University of Warwick, UK Health Security Agency, University of Cambridge Social Science Impact Fund
Repository
Method, figures by host Method Repository signals are the figures read from the source repository a package links to: stars, forks, issues, commits, releases and the time issues take to close. They are read from GitHub, GitLab, Codeberg and Bitbucket.Repository signals
URL and BugReports fields of its DESCRIPTION file. Read-only mirrors, the cran and bioc accounts on GitHub and git.bioconductor.org, are left out.
edwintang903 / tsgc on github.com
- Stars
- 1
- Forks
- 1
- Open issues
- –
- Last commit
- 1 Sep 2026
Activity
- Commits
- 330
- Open pull requests
- 0
- Tagged releases
- 0
- Latest tagged release
- –
- Issues closed in
- –
- Pull requests closed in
- 0 days (median)
- Pull requests merged
- 71%
- Created
- 22 Jul 2024
- Licence file reads as
- –
Development practices (4)
| Kind | Found |
|---|---|
| Governance and community | Contributing guide |
| CRAN release process | cran-comments.md |
| Research and citation | codemeta.json |
| Lint, format, editor | RStudio project |
Method, repository practices Method Beta Each week a scan of the public source repository a package links to looks for the tools a maintainer has set up, and the Repository section lists the findings. Repositories on GitHub and GitLab are scanned.Repository practices
R CMD build reads .Rbuildignore and leaves out files used only in development, such as .github/, .lintr, renv/, a Dockerfile and cran-comments.md, so the released source file holds almost none of them. The repository is the one place these files stay visible.
Earlier repositories (1)
History
Method, History Method Archived is built from CRAN's archive records, its list of check deadlines and Bioconductor's package records. Every figure is counted to 29 Oct 2026, the day the data was read.Packages leaving
- On CRAN
- Release
Release notes (2.0.0)
Breaking changes
- Internal computation no longer relies on
xts/zoo. Series used during estimation and filtering are now represented with a new, dependency-freeidx_seriesclass, with calendar handling provided by a companionidx_calendarclass. Bundled datasets are unaffected and remainxtsobjects;xts_to_idx()is provided to convert user-suppliedxts/zoodata toidx_serieswhere needed. Code that relied on the internal (non-exported) representation of series may need to be updated. SSModelDynGompertzReinithas been deprecated. Its functionality is now provided directly bySSModelDynamicGompertzvia thereinit.idx,original.results, anduse.presample.infofields, so a single class now covers both the standard and reinitialised model.SSModelBasehas also been deprecated, with its logic folded intoSSModelDynamicGompertz.- In
FilterResults, theconfidence_levelargument topredict_all()andget_gy_ci()has been renamed toconfidence.level, for consistency with naming elsewhere in the package. Calls that pass this argument by name will need to be updated. The default value ofsea.oninpredict_all()has also changed, fromFALSEtoTRUE. forecast_peak(),forecast.peak(), andplot_new_cases()have been deprecated.plot_new_cases()has been renamed toplot_forecast()as the growth curve theory extends beyond epidemiological settings.
New features
- Added a leading indicator model, via the new
SSModelLeadingIndicatorandFilterResultsLIreference classes, for modelling a target series using a leading series (see Harvey, A. (2021). "Time Series Modelling of Epidemics: Leading Indicators, Control Groups and Policy Assessment." *National Institute Economic Review*, 257, 83-100).FilterResultsLIprovidespredict_level(),predict_all(),get_growth_y(),get_gy_ci(),print(),summary(), andmapes()methods, parallelingFilterResultsfor the standard model. - Added five new example datasets:
ukitaly,gauteng_weather_2021,england_weather_2021,nintendo_sales, andetrading_apps, including weather data to support leading indicator examples. - Added
idx_series()and supporting methods (idx_cbind(),idx_rbind(),idx_diff(),idx_lag(),idx_range(),idx_values(),idx_positions(), and standard methods includinglength(),head(),tail(),as.matrix(),as.numeric(),as.double(), andprint()) as a dependency-free representation of time series for internal computation. - Added
idx_calendar()and supporting helpers (idx_step(),idx_to_date(),idx_calendar_offset(),idx_calendar_step(),idx_calendar_multi_step(), and related utilities) providing a consistent translation layer between integer positions and calendar dates for daily, weekly, monthly, quarterly, and annual data. - Added
get_timeframe(),idx_to_pos(),idx_offset_to_pos(), andidx_detect_calendar_pattern()to support the new indexing system. - Added
print_model_diagnostics()to surface model diagnostics more clearly. - Added
xts_to_idx()to convertxts/zooobjects to the internalidx_seriesrepresentation, for users supplying their ownxtsdata. - Added
cross_val()for cross-validating one or more models over a series of rolling estimation windows, andmapes()for computing mean absolute percentage errors from forecast results. - Added
df2ldl_lead()for handling two-column data for leading indicator models. - Added
print()andsummary()S3 methods forSSModelDynamicGompertz,SSModelLeadingIndicator,FilterResults, andFilterResultsLI. - Added new plotting functions
plot_compare_forecast()(compare forecasts across models),plot_log_forecast()(forecasts on the log scale), andplot_r0()(plot estimated reproduction numbers fromestimate_r0()). Also added plotting functionality for models (plot()takes in a model object) - Added a new set of accessor functions (
accessorFns.R) for extracting components from fitted model andKFSobjects, includingoutput(),modelKFS(),seasonalComp(),att(),Ptt(),get_V(),gety(),alphahat(), and a standaloneestimate()wrapper around a model'sestimate()method.
Improvements
- Substantially expanded plotting internals with helper functions (
idx_series_df(),idx_resolve_axis(),idx_axis_opts(),idx_x_scale(),idx_x_lab(),idx_add_info_box(), and related helpers) to give more consistent, better-labelled axes across all plot types, including support for non-daily frequencies. - Reduced the package's dependency footprint by removing reliance on
xts/zoofrom internal computation.
Bug fixes
- Various small fixes to filtering, forecasting, and plotting uncovered during the internal rewrite.