Skip to content
cranPublic

About

❗ This is a read-only mirror of the CRAN R package repository. tsutils — Time Series Exploration, Modelling and Forecasting. Homepage: https://github.com/trnnick/tsutils/

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 (!requireNamespace("remotes", quietly = TRUE)) install.packages("remotes")
remotes::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.
  • seastest: seasonal test based on the Friedman test.
  • 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:

  • plotS: Generic function to plot hierarchies (S matrix).
  • plotSblock: Function to plot S-matrices with block representation.
  • plotStree: Function to plot S-matrices with tree representation.
  • plotThief: Function to plot temporal hierarchies.
  • Saugment: Augment hierarchy with discrepancy series.
  • Smean: Mean (equal or unequal weights) aggregation S matrix.
  • Sgroup: S matrix from dimensions.
  • Sthief: temporal hierarchy S matrix.

Forecasting process modelling:

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

Evaluation

  • nemenyi: column-wise Friedman and Nemenyi post-hoc testing.
  • nemenyi.sens: sensitivity of the Nemenyi test to the confidence level.

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.
  • colour.blend: emulate transparency colours for EPS exports.

Time series data:

  • referrals: A&E monthly referrals.
  • gdpchain: Hierarchy of US real GDP in chained dollars.

Authors & contributors

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!

About

❗ This is a read-only mirror of the CRAN R package repository. tsutils — Time Series Exploration, Modelling and Forecasting. Homepage: https://github.com/trnnick/tsutils/

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages