MyNixOS website logo
Description

Time Series Exploration, Modelling and Forecasting.

Includes: (i) tests and visualisations that can help the modeller explore time series components and perform decomposition; (ii) modelling shortcuts, such as functions to construct lagmatrices and seasonal dummy variables of various forms; (iii) an implementation of the Theta method; (iv) tools to facilitate the design of the forecasting process, such as ABC-XYZ analyses; and (v) "quality of life" functions, such as treating time series for trailing and leading values.

Functions for time series exploration, modelling and forecasting for R: tsutils package

CRAN_Status_Badge Downloads

Development repository for the tsutils package for R. Stable version can be found at: https://cran.r-project.org/package=tsutils

Installing

To install the development version use:

if (!require("devtools")){install.packages("devtools")}
devtools::install_github("trnnick/tsutils")

Otherwise, install the stable version from CRAN:

install.packages("tsutils")

Functionality

The tsutils package provides functions to support various aspects of time series and forecasting modelling. In particular this package includes: (i) tests and visualisations that can help the modeller explore time series components and perform decomposition; (ii) modelling shortcuts, such as functions to construct lagmatrices and seasonal dummy variables of various forms; (iii) an implementation of the Theta method; (iv) tools to facilitate the design of the forecasting process, such as ABC-XYZ analyses; and (v) "quality of life" tools, such as treating time series for trailing and leading values.

Time series exploration:

  • cmav: centred moving average.
  • coxstuart: Cox-Stuart test for location/dispersion.
  • decomp: classical time series decomposition.
  • seasplot: construct seasonal plots.
  • trendtest: test a time series for trend.

Time series modelling:

  • getOptK: optimal temporal aggregation level for AR(1), MA(1), ARMA(1,1).
  • lagmatrix: create leads/lags of variable.
  • residout: construct control chart of residuals.
  • seasdummy: create seasonal dummies.
  • theta: Theta method.

Hierarchical time series:

  • Sthief: temporal hierarchy S matrix.
  • plotSthief: plot temporal hierarchy S matrix.

Forecasting process modelling:

  • abc: ABC analysis.
  • xyz: XYZ analysis.
  • abcxyz: ABC-XYZ analyses visualisation.

Quality of life:

  • geomean: geometric mean.
  • lambdaseq: generate sequence of lambda for LASSO regression.
  • leadtrail: remove leading/training zeros/NAs.
  • wins: winsorisation, including vectorised versions colWins and rowWins.

Time series data:

  • referrals: A&E monthly referrals.

Authors & contributors

  • Nikolaos Kourentzes - (http://nikolaos.kourentzes.com/)
  • Ivan Svetunkov - (https://forecasting.svetunkov.ru/)
  • Oliver Schaer - (https://scholar.google.com/citations?user=5PoJL3sAAAAJ&hl=en)

References

References are provided where necessary at the help file of each function. The overall modelling philosophy is reflected in:

Ord K., Fildes R., Kourentzes N. (2017) Principles of Business Forecasting, 2e. Wessex Press Publishing Co.

License

This project is licensed under the GPL3 License

Happy forecasting!

Metadata

Version

0.9.4

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows