{
  "_id": "6a101478acfb0bcc41c83ade",
  "Package": "tsgc",
  "Title": "Time Series Methods Based on Growth Curves",
  "Version": "0.0",
  "Authors@R": "c(person(given = \"Craig\", family = \"Thamotheram\", role = c(\"aut\", \"cre\"), email = \"cpt@tacindex.com\"))",
  "Description": "The 'tsgc' package provides comprehensive tools for the\nanalysis and forecasting of epidemic trajectories. It is\ndesigned to model the progression of an epidemic over time\nwhile accounting for the various uncertainties inherent in\nreal-time data. Underpinned by a dynamic Gompertz model, the\npackage adopts a state space approach, using the Kalman filter\nfor flexible and robust estimation of the non-linear growth\npattern commonly observed in epidemic data. The\nreinitialization feature enhances the model’s ability to adapt\nto the emergence of new waves. The forecasts generated by the\npackage are of value to public health officials and researchers\nwho need to understand and predict the course of an epidemic to\ninform decision-making. Beyond its application in public\nhealth, the package is also a useful resource for researchers\nand practitioners in fields where the trajectories of interest\nresemble those of epidemics, such as innovation diffusion. The\npackage includes functionalities for data preprocessing, model\nfitting, and forecast visualization, as well as tools for\nevaluating forecast accuracy. The core methodologies\nimplemented in 'tsgc' are based on well-established statistical\ntechniques as described in Harvey and Kattuman (2020)\n<doi:10.1162/99608f92.828f40de>, Harvey and Kattuman (2021)\n<doi:10.1098/rsif.2021.0179>, and Ashby, Harvey, Kattuman, and\nThamotheram (2024)\n<https://www.jbs.cam.ac.uk/wp-content/uploads/2024/03/cchle-tsgc-paper-2024.pdf>.",
  "URL": "https://github.com/Craig-PT/tsgc",
  "License": "GPL (>= 3)",
  "Encoding": "UTF-8",
  "VignetteBuilder": "knitr",
  "Roxygen": "list(markdown = TRUE)",
  "RoxygenNote": "7.2.3",
  "Config/testthat/edition": "3",
  "BugReports": "https://github.com/Craig-PT/tsgc/issues",
  "LazyData": "true",
  "Config/pak/sysreqs": "libicu-dev",
  "Repository": "https://craig-pt.r-universe.dev",
  "Date/Publication": "2024-08-11 21:31:52 UTC",
  "RemoteUrl": "https://github.com/craig-pt/tsgc",
  "RemoteRef": "HEAD",
  "RemoteSha": "130755061248937e973dcc4bdd34a7f7de23407a",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-22 08:27:51 UTC",
    "User": "root"
  },
  "Author": "Craig Thamotheram [aut, cre]",
  "Maintainer": "Craig Thamotheram <cpt@tacindex.com>",
  "MD5sum": "062a61e754aa92cb896c3ce366f2812d",
  "_user": "craig-pt",
  "_type": "src",
  "_file": "tsgc_0.0.tar.gz",
  "_fileid": "2062b5630c1c327def903d556643db7e21fad39deecb1d60bff805361fb6541d",
  "_filesize": 1348091,
  "_sha256": "2062b5630c1c327def903d556643db7e21fad39deecb1d60bff805361fb6541d",
  "_created": "2026-05-22T08:27:51.000Z",
  "_published": "2026-05-22T08:31:52.505Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 77343990701,
      "time": 208,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7156209673"
    },
    {
      "job": 77343990682,
      "time": 182,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7156202265"
    },
    {
      "job": 77343990738,
      "time": 148,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7156185660"
    },
    {
      "job": 77343990692,
      "time": 202,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7156197390"
    },
    {
      "job": 77343405275,
      "time": 238,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7156147542"
    },
    {
      "job": 77343990663,
      "time": 148,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7156191506"
    },
    {
      "job": 77343990712,
      "time": 124,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7156184455"
    },
    {
      "job": 77343990687,
      "time": 118,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7156182363"
    },
    {
      "job": 77343990679,
      "time": 128,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7156185386"
    }
  ],
  "_buildurl": "https://github.com/r-universe/craig-pt/actions/runs/26276932561",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/craig-pt/tsgc",
  "_commit": {
    "id": "130755061248937e973dcc4bdd34a7f7de23407a",
    "author": "Craig T <5773950+Craig-PT@users.noreply.github.com>",
    "committer": "Craig T <5773950+Craig-PT@users.noreply.github.com>",
    "message": "Update description to one paragraph including more information on why may be useful and references to the methods implemented in the associated papers.\n",
    "time": 1723411912
  },
  "_maintainer": {
    "name": "Craig Thamotheram",
    "email": "cpt@tacindex.com",
    "login": "craig-tac",
    "description": "",
    "uuid": 103851528
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 2.10",
      "role": "Depends"
    },
    {
      "package": "KFAS",
      "role": "Imports"
    },
    {
      "package": "xts",
      "role": "Imports"
    },
    {
      "package": "ggplot2",
      "role": "Imports"
    },
    {
      "package": "ggthemes",
      "role": "Imports"
    },
    {
      "package": "zoo",
      "role": "Imports"
    },
    {
      "package": "magrittr",
      "role": "Imports"
    },
    {
      "package": "scales",
      "role": "Imports"
    },
    {
      "package": "dplyr",
      "role": "Imports"
    },
    {
      "package": "tidyr",
      "role": "Imports"
    },
    {
      "package": "methods",
      "role": "Imports"
    },
    {
      "package": "ggfortify",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "RColorBrewer",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "ggforce",
      "role": "Suggests"
    },
    {
      "package": "gridExtra",
      "role": "Suggests"
    },
    {
      "package": "latex2exp",
      "role": "Suggests"
    },
    {
      "package": "here",
      "role": "Suggests"
    },
    {
      "package": "timetk",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "role": "Suggests"
    },
    {
      "package": "purrr",
      "role": "Suggests"
    },
    {
      "package": "kableExtra",
      "role": "Suggests"
    }
  ],
  "_owner": "craig-pt",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [],
  "_tags": [],
  "_stars": 1,
  "_contributors": [
    {
      "user": "craig-pt",
      "count": 10,
      "uuid": 5773950
    },
    {
      "user": "mashby22",
      "count": 1,
      "uuid": 174328986
    }
  ],
  "_userbio": {
    "uuid": 5773950,
    "type": "user",
    "name": "Craig"
  },
  "_downloads": {
    "count": 270,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/tsgc"
  },
  "_devurl": "https://github.com/craig-pt/tsgc",
  "_searchresults": 25,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "extra/tsgc.html",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/craig-pt/tsgc",
  "_realowner": "craig-pt",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.0",
      "date": "2024-08-26"
    }
  ],
  "_exports": [
    "argmax",
    "df2ldl",
    "forecast_peak",
    "forecast.peak",
    "plot_forecast",
    "plot_gy_ci",
    "plot_gy_components",
    "plot_holdout",
    "plot_new_cases",
    "reinitialise_dataframe",
    "SSModelBase",
    "SSModelDynamicGompertz",
    "SSModelDynGompertzReinit",
    "write_results"
  ],
  "_datasets": [
    {
      "name": "england",
      "title": "Cumulative cases of Covid-19 in England.",
      "object": "england",
      "class": [
        "xts",
        "zoo"
      ],
      "fields": [
        "cum_cases",
        "cum_admissions",
        "cum_deaths",
        "hospital_cases"
      ],
      "rows": 733,
      "table": true,
      "tojson": false
    },
    {
      "name": "gauteng",
      "title": "Cumulative cases of Covid-19 in the South African province of Gauteng.",
      "object": "gauteng",
      "class": [
        "xts",
        "zoo"
      ],
      "fields": [
        "cum_cases"
      ],
      "rows": 667,
      "table": true,
      "tojson": false
    }
  ],
  "_help": [
    {
      "page": "argmax",
      "title": "Return index and value of maximum",
      "topics": [
        "argmax"
      ]
    },
    {
      "page": "df2ldl",
      "title": "Compute log growth rate of cumulated dataset",
      "topics": [
        "df2ldl"
      ]
    },
    {
      "page": "england",
      "title": "Cumulative cases of Covid-19 in England.",
      "topics": [
        "england"
      ]
    },
    {
      "page": "FilterResults-class",
      "title": "FilterResults",
      "topics": [
        "FilterResults",
        "FilterResults-class"
      ]
    },
    {
      "page": "forecast_peak",
      "title": "Returns forecast of number of periods until peak given 'KFAS::KFS' output.",
      "topics": [
        "forecast_peak"
      ]
    },
    {
      "page": "forecast.peak",
      "title": "Returns forecast of number of periods until peak given estimated state variables delta and gamma.",
      "topics": [
        "forecast.peak"
      ]
    },
    {
      "page": "gauteng",
      "title": "Cumulative cases of Covid-19 in the South African province of Gauteng.",
      "topics": [
        "gauteng"
      ]
    },
    {
      "page": "plot_forecast",
      "title": "Plots forecast and realised values of the log cumulative growth rate",
      "topics": [
        "plot_forecast"
      ]
    },
    {
      "page": "plot_gy_ci",
      "title": "Plots the growth rates and slope of the log cumulative growth rate",
      "topics": [
        "plot_gy_ci"
      ]
    },
    {
      "page": "plot_gy_components",
      "title": "Plots the growth rates and slope of the log cumulative growth rate",
      "topics": [
        "plot_gy_components"
      ]
    },
    {
      "page": "plot_holdout",
      "title": "Plots the forecast of new cases (the difference of the cumulated variable) over a holdout sample.",
      "topics": [
        "plot_holdout"
      ]
    },
    {
      "page": "plot_new_cases",
      "title": "Plots the forecast of new cases (the difference of the cumulated variable)",
      "topics": [
        "plot_new_cases"
      ]
    },
    {
      "page": "reinitialise_dataframe",
      "title": "Reinitialise a data frame by subtracting the 'reinit.date' row from all columns",
      "topics": [
        "reinitialise_dataframe"
      ]
    },
    {
      "page": "SSModelBase-class",
      "title": "Base class for estimating time-series growth curve models. Classes 'SSModelDynamicGompertz' and 'SSModelDynGompertzReinit' refer back to this base class.",
      "topics": [
        "SSModelBase",
        "SSModelBase-class"
      ]
    },
    {
      "page": "SSModelDynamicGompertz-class",
      "title": "Class for dynamic Gompertz curve state space model object.",
      "topics": [
        "SSModelDynamicGompertz",
        "SSModelDynamicGompertz-class"
      ]
    },
    {
      "page": "SSModelDynGompertzReinit-class",
      "title": "Class for re-initialised dynamic Gompertz curve model",
      "topics": [
        "SSModelDynGompertzReinit",
        "SSModelDynGompertzReinit-class"
      ]
    },
    {
      "page": "write_results",
      "title": "Write a selection of relevant results to disc",
      "topics": [
        "write_results"
      ]
    }
  ],
  "_readme": "https://github.com/craig-pt/tsgc/raw/HEAD/README.md",
  "_rundeps": [
    "cli",
    "cpp11",
    "dplyr",
    "farver",
    "generics",
    "ggplot2",
    "ggthemes",
    "glue",
    "gtable",
    "isoband",
    "KFAS",
    "labeling",
    "lattice",
    "lifecycle",
    "magrittr",
    "pillar",
    "pkgconfig",
    "purrr",
    "R6",
    "RColorBrewer",
    "rlang",
    "S7",
    "scales",
    "stringi",
    "stringr",
    "tibble",
    "tidyr",
    "tidyselect",
    "utf8",
    "vctrs",
    "viridisLite",
    "withr",
    "xts",
    "zoo"
  ],
  "_vignettes": [
    {
      "source": "tsgc_vignette.Rmd",
      "filename": "tsgc_vignette.html",
      "title": "Forecasting epidemic trajectories: Time Series Growth Curves package tsgc",
      "author": "Michael Ashby, Andrew Harvey, Paul Kattuman, Craig Thamotheram",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Theory",
        "Gompertz curve",
        "Dynamic Gompertz  model",
        "State space form and estimation",
        "Forecasts and peak prediction",
        "Reproduction Number $R_t$",
        "Reinitialization",
        "Reinitalizing the data series",
        "Reinitalizing the model",
        "Functionality of tsgc",
        "Illustration of the tsgc package",
        "Setting up the forecasting exercise",
        "Estimation",
        "Results",
        "Triggering reinitialization",
        "Estimating the reinitialized model",
        "Conclusions",
        "Acknowledgements",
        "References",
        "Appendix: Incorporating seasonal terms into the state space model"
      ],
      "created": "2024-02-27 13:16:53",
      "modified": "2024-06-27 20:28:37",
      "commits": 3
    }
  ],
  "_score": 4.096910013008056,
  "_indexed": true,
  "_nocasepkg": "tsgc",
  "_universes": [
    "craig-pt",
    "craig-tac"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.0",
      "date": "2026-05-22T08:31:00.000Z",
      "distro": "noble",
      "commit": "130755061248937e973dcc4bdd34a7f7de23407a",
      "fileid": "09a6bd2edc38f1fa7bf1121814bb9bd20d1bf1cf3e6b7ca9e1d2c36163f34c31",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/craig-pt/actions/runs/26276932561"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.0",
      "date": "2026-05-22T08:30:38.000Z",
      "distro": "noble",
      "commit": "130755061248937e973dcc4bdd34a7f7de23407a",
      "fileid": "05e1fda9ebeb25d9f6579f21747ebca30e7825301be158be6554db36e8dd72d1",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/craig-pt/actions/runs/26276932561"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.0",
      "date": "2026-05-22T08:29:55.000Z",
      "commit": "130755061248937e973dcc4bdd34a7f7de23407a",
      "fileid": "5503ebc2f56303520de4b61aad11f2dfdd0526ab6c6052e2e2421d16ca7be0de",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/craig-pt/actions/runs/26276932561"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "0.0",
      "date": "2026-05-22T08:30:16.000Z",
      "commit": "130755061248937e973dcc4bdd34a7f7de23407a",
      "fileid": "3ade75e0305b83f2ef87e0201f9e0580d7408227124c8e1ce2f1fd3a2e650140",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/craig-pt/actions/runs/26276932561"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.0",
      "date": "2026-05-22T08:30:36.000Z",
      "commit": "130755061248937e973dcc4bdd34a7f7de23407a",
      "fileid": "a0fbbe411f9f01012262864a4e0d002d9656b1449d45075e971315464d4f2465",
      "status": "success",
      "buildurl": "https://github.com/r-universe/craig-pt/actions/runs/26276932561"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.0",
      "date": "2026-05-22T08:29:33.000Z",
      "commit": "130755061248937e973dcc4bdd34a7f7de23407a",
      "fileid": "7bdbbf6507be01be7f6935f02e6dd0115ee08b83d966471c6946c3d11fabe946",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/craig-pt/actions/runs/26276932561"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.0",
      "date": "2026-05-22T08:29:26.000Z",
      "commit": "130755061248937e973dcc4bdd34a7f7de23407a",
      "fileid": "e5e26906425525831b0a36e5138c99d2c6cc35fbad00f293c34c1cc11d32ffc0",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/craig-pt/actions/runs/26276932561"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "0.0",
      "date": "2026-05-22T08:29:34.000Z",
      "commit": "130755061248937e973dcc4bdd34a7f7de23407a",
      "fileid": "e6a04fcf94144f06ed5a00e2b50fc156ff0377eaeb5127d964de7a44bccf4bfc",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/craig-pt/actions/runs/26276932561"
    }
  ]
}