Last updated on 2021-12-20 by Rob J Hyndman

Base R ships with a lot of functionality useful for time series, in particular in the stats package. This is complemented by many packages on CRAN, which are briefly summarized below. There is also a considerable overlap between the tools for time series and those in the Econometrics and Finance task views. The packages in this view can be roughly structured into the following topics. If you think that some package is missing from the list, please let us know.

**Basics**

*Infrastructure*: Base R contains substantial infrastructure for representing and analyzing time series data. The fundamental class is`"ts"`

that can represent regularly spaced time series (using numeric time stamps). Hence, it is particularly well-suited for annual, monthly, quarterly data, etc.*Rolling statistics*: Moving averages are computed by`ma`

from forecast, and`rollmean`

from zoo. The latter also provides a general function`rollapply`

, along with other specific rolling statistics functions. slider calculates a diverse and comprehensive set of type-stable running functions for any R data types. tsibble provides`slide()`

for rolling statistics,`tile()`

for non-overlapping sliding windows, and`stretch()`

for expanding windows. tbrf provides rolling functions based on date and time windows instead of n-lagged observations. roll provides parallel functions for computing rolling statistics. runner provides tools for running any R function in rolling windows or date windows. runstats provides fast computational methods for some running sample statistics. For data.table,`froll()`

can be used for high-performance rolling statistics.*Graphics*: Time series plots are obtained with`plot()`

applied to`ts`

objects. (Partial) autocorrelation functions plots are implemented in`acf()`

and`pacf()`

. Alternative versions are provided by`Acf()`

and`Pacf()`

in forecast, along with a combination display using`tsdisplay()`

. Seasonal displays are obtained using`monthplot()`

in stats,`seasonplot`

in forecast, and`seasplot`

in tsutils. feasts and brolgar provide various time series graphics for tsibble objects including time plots, season plots, subseries plots, ACF and PACF plots, and some combination displays. Interactive graphics for tsibbles using htmlwidgets are provided by tsibbletalk. SDD provides more general serial dependence diagrams, while dCovTS computes and plots the distance covariance and correlation functions of time series. ggseas provides additional ggplot2 graphics for seasonally adjusted series and rolling statistics. Calendar plots are implemented in sugrrants. gravitas allows for visualizing probability distributions conditional on bivariate temporal granularities. dygraphs provides an interface to the Dygraphs interactive time series charting library. TSstudio provides some interactive visualization tools for time series. ZRA plots forecast objects from the forecast package using dygraphs. Basic fan plots of forecast distributions are provided by forecast and vars. More flexible fan plots of any sequential distributions are implemented in fanplot.

**Times and Dates**

- Class
`"ts"`

can only deal with numeric time stamps, but many more classes are available for storing time/date information and computing with it. For an overview see*R Help Desk: Date and Time Classes in R*by Gabor Grothendieck and Thomas Petzoldt in R News 4(1), 29-32. - Classes
`"yearmon"`

and`"yearqtr"`

from zoo allow for more convenient computation with monthly and quarterly observations, respectively. - Class
`"Date"`

from the base package is the basic class for dealing with dates in daily data. The dates are internally stored as the number of days since 1970-01-01. - The chron package
provides classes for
`dates()`

,`hours()`

and date/time (intra-day) in`chron()`

. There is no support for time zones and daylight savings time. Internally,`"chron"`

objects are (fractional) days since 1970-01-01. - Classes
`"POSIXct"`

and`"POSIXlt"`

implement the POSIX standard for date/time (intra-day) information and also support time zones and daylight savings time. However, the time zone computations require some care and might be system-dependent. Internally,`"POSIXct"`

objects are the number of seconds since 1970-01-01 00:00:00 GMT. Package lubridate provides functions that facilitate certain POSIX-based computations, while clock provides a comprehensive library for date-time manipulations using a new family of orthogonal date-time classes (durations, time points, zoned-times, and calendars). timechange allows for efficient manipulation of date-times accounting for time zones and daylight saving times. wktmo converts weekly data to monthly data in several different ways. - Class
`"timeDate"`

is provided in the timeDate package (previously: fCalendar). It is aimed at financial time/date information and deals with time zones and daylight savings times via a new concept of "financial centers". Internally, it stores all information in`"POSIXct"`

and does all computations in GMT only. Calendar functionality, e.g., including information about weekends and holidays for various stock exchanges, is also included. - The tis package
provides the
`"ti"`

class for time/date information. - The
`"mondate"`

class from the mondate package facilitates computing with dates in terms of months. - The tempdisagg package includes methods for temporal disaggregation and interpolation of a low frequency time series to a higher frequency series.
- Time series disaggregation is also provided by tsdisagg2 and disaggR.
- TimeProjection extracts useful time components of a date object, such as day of week, weekend, holiday, day of month, etc, and put it in a data frame.

**Time Series Classes**

- As mentioned above,
`"ts"`

is the basic class for regularly spaced time series using numeric time stamps. - The zoo package
provides infrastructure for regularly and irregularly spaced time series using arbitrary classes for the time stamps (i.e., allowing all classes from the previous section).
It is designed to be as consistent as possible with
`"ts"`

. - The package xts is based on zoo and provides uniform handling of R's different time-based data classes.
- Several packages aim to handle time-based tibbles: tsibble provides tidy temporal data frames and associated tools; tsbox contains tools for working with and coercing between many time series classes including tsibble, ts, xts, zoo and more. timetk is another toolkit for converting between various time series data classes.
- Some manipulation tools for time series are available in data.table including
`shift()`

for lead/lag operations. Further basic time series functionalities are offered by DTSg which is based on data.table. - collapse provides fast computation of several time series functions such as lead/lag operations, (quasi-, log-) differences and growth rates on time-series and panel data, and ACF/PACF/CCF estimation for panel data.
- Various packages implement irregular time series
based on
`"POSIXct"`

time stamps, intended especially for financial applications. These include`"irts"`

from tseries, and`"fts"`

from fts. - The class
`"timeSeries"`

in timeSeries (previously: fSeries) implements time series with`"timeDate"`

time stamps. - The class
`"tis"`

in tis implements time series with`"ti"`

time stamps. - The package tframe contains infrastructure for setting time frames in different formats.
- timeseriesdb manages time series for official statistics by mapping
`ts`

objects to PostgreSQL relations.

**Forecasting and Univariate Modeling**

- The fable package provides tools for fitting univariate time series models to many series simultaneously including ETS, ARIMA, TSLM and other models. It also provides many functions for computing and analysing forecasts. The time series must be in the
`tsibble`

format. fabletools provides tools for extending the fable framework. - The forecast package provides similar tools for
`ts`

objects, while modeltime and modeltime.ensemble provides time series forecasting tools for use with the 'tidymodels' ecosystem. *Exponential smoothing*:`HoltWinters()`

in stats provides some basic models with partial optimization,`ETS()`

from fable and`ets()`

from forecast provide a larger set of models and facilities with full optimization. robets provides a robust alternative to the`ets()`

function. smooth implements some generalizations of exponential smoothing. legion implements multivariate versions of exponential smoothing. The MAPA package combines exponential smoothing models at different levels of temporal aggregation to improve forecast accuracy. Some Bayesian extensions of exponential smoothing are contained in Rlgt.- prophet forecasts time series based on an additive model where nonlinear trends are fit with yearly and weekly seasonality, plus holidays. It works best with daily data. fable.prophet allows prophet models to be used in the fable framework.
- The theta method
is implemented in the
`THETA()`

function from fable,`thetaf()`

function from forecast, and`theta()`

from tsutils. An alternative and extended implementation is provided in forecTheta. *Autoregressive models*:`ar()`

in stats (with model selection) and FitAR for subset AR models.*ARIMA models*:`arima()`

in stats is the basic function for ARIMA, SARIMA, RegARIMA, and subset ARIMA models. It is enhanced in the fable package via the`ARIMA()`

function which allows for automatic modelling. Similar functionality is provided in the forecast package via the`auto.arima()`

function.`arma()`

in the tseries package provides different algorithms for ARMA and subset ARMA models. Other estimation methods including the innovations algorithm are provided by itsmr. FitARMA implements a fast MLE algorithm for ARMA models. Package gsarima contains functionality for Generalized SARIMA time series simulation. Robust ARIMA modeling is provided in the robustarima package. bayesforecast fits Bayesian time series models including seasonal ARIMA and ARIMAX models. BayesARIMAX implements Bayesian estimation of ARIMAX models. The mar1s package handles multiplicative AR(1) with seasonal processes. TSTutorial provides an interactive tutorial for Box-Jenkins modelling. Improved prediction intervals for ARIMA and structural time series models are provided by tsPI.- ARIMA models with multiple seasonal periods can be handled with tfarima and smooth.
*Periodic ARMA models*: partsm for periodic autoregressive time series models, and perARMA and pcts for periodic ARMA modelling and other procedures for periodic time series analysis.*Long memory models*: Some facilities for fractional differenced ARFIMA models are provided in the fracdiff package. The arfima package has more advanced and general facilities for ARFIMA and ARIMA models, including dynamic regression (transfer function) models. Additional methods for fitting and simulating non-stationary ARFIMA models are in nsarfima. LongMemoryTS provides a collection of functions for analysing long memory time series. Fractionally differenced Gegenbaur ARMA processes are handled by garma. esemifar provides tools for nonparametric smoothing of long-memory time series.*Transfer function*models are provided by the`arfima`

function in the arfima and the tfarima packages.*Structural (or unobserved component) models*are implemented in`StructTS()`

in stats and in stsm, while automatic modelling and forecasting are provided by UComp and autostsm. KFKSDS provides a naive implementation of the Kalman filter and smoothers for univariate state space models. statespacer implements univariate state space models including structural and SARIMA models. Bayesian structural time series models are implemented in bsts Robust Kalman filtering is provided by RobKF.- Non-Gaussian time series can be handled with GLARMA state space models via glarma, and using Generalized Autoregressive Score models in the GAS package. GlarmaVarSel provides variable selection in high-dimensional sparse GLARMA models. Conditional Auto-Regression models using Monte Carlo Likelihood methods are implemented in mclcar. Efficient Bayesian inference for nonlinear and non-Gaussian state space models is provided in bssm. Non-Gaussian state space models with exact marginal likelihood are given by NGSSEML.
*GARCH models*:`garch()`

from tseries fits basic GARCH models. Many variations on GARCH models are provided by rugarch. Other univariate GARCH packages include fGarch which implements ARIMA models with a wide class of GARCH innovations. bayesforecast fits Bayesian time series models including several variations of GARCH models. There are many more GARCH packages described in the Finance task view.*Stochastic volatility*models are handled by stochvol in a Bayesian framework.*Count time series*models are handled in the tscount and acp packages. ZIM provides for Zero-Inflated Models for count time series. tsintermittent implements various models for analysing and forecasting intermittent demand time series.*Censored time series*can be modelled using carx. ARCensReg fits univariate censored regression models with autoregressive errors.*Diffusion models*such as Bass and Gompertz curves are provided by diffusion.*Portmanteau tests*are provided via`Box.test()`

in the stats package. Additional tests are given by portes, WeightedPortTest and testcorr.- Outlier detection
following the Chen-Liu approach is provided by tsoutliers.
The
`tsoutliers`

and`tsclean`

functions in the forecast package provide some simple heuristic methods for identifying and correcting outliers. otsad implements a set of online anomaly detectors for time series. tsrobprep provides methods for replacing missing values and outliers using a model-based approach. *Change point detection*is provided in strucchange and strucchangeRcpp (using linear regression models) and in trend (using nonparametric tests). The changepoint package provides many popular changepoint methods, and ecp does nonparametric changepoint detection for univariate and multivariate series. changepoint.np implements the nonparametric PELT algorithm, changepoint.mv detects changepoints in multivariate time series, while changepoint.geo implements the high-dimensional changepoint detection method GeomCP. VARDetect implements algorithms for detecting multiple changes in structural VAR models. InspectChangepoint uses sparse projection to estimate changepoints in high-dimensional time series. breakfast includes methods for fast multiple change-point detection and estimation.- Tests for possibly non-monotonic trends are provided by funtimes.
*Time series imputation*is provided by the imputeTS package. Some more limited facilities are available using`na.interp()`

from the forecast package. imputeTestbench provides tools for testing and comparing imputation methods. mtsdi implements an EM algorithm for imputing missing values in multivariate normal time series, accounting for spatial and temporal correlations.- The seer package implements a framework for feature-based forecast model selection.
- Forecasts can be combined in the fable package using simple linear expressions. ForecastComb supports many forecast combination methods including simple, geometric and regression-based combinations. forecastHybrid provides functions for ensemble forecasts, combining approaches from the forecast package. opera has facilities for online predictions based on combinations of forecasts provided by the user. profoc combines probabilistic forecasts using CRPS learning.
- Point forecast evaluation
is provided in the
`accuracy()`

function from the fable and forecast packages. Distributional forecast evaluation using scoring rules is available in fable, scoringRules and scoringutils. The Diebold-Mariano test for comparing the forecast accuracy of two models is implemented in the`dm.test()`

function in forecast. A multivariate version of the Diebold-Mariano test is provided by multDM. tsutils implements the Nemenyi test for comparing forecasts. greybox provides`ro()`

for general rolling origin evaluation of forecasts. - Tidy tools for forecasting are provided by sweep, converting objects produced in forecast to "tidy" data frames.
- Multi-step-ahead direct forecasting with several machine learning approaches are provided in forecastML.
*Miscellaneous*: ltsa contains methods for linear time series analysis, timsac for time series analysis and control.

**Frequency analysis**

*Spectral density estimation*is provided by`spectrum()`

in the stats package, including the periodogram, smoothed periodogram and AR estimates. Bayesian spectral inference is provided by bspec and regspec. quantspec includes methods to compute and plot Laplace periodograms for univariate time series. The Lomb-Scargle periodogram for unevenly sampled time series is computed by lomb. spectral uses Fourier and Hilbert transforms for spectral filtering. psd produces adaptive, sine-multitaper spectral density estimates. kza provides Kolmogorov-Zurbenko Adaptive Filters including break detection, spectral analysis, wavelets and KZ Fourier Transforms. multitaper also provides some multitaper spectral analysis tools. Higher-order spectral analysis is implemented in rhosa, including bispectrum, bicoherence, cross-bispectrum and cross-bicoherence.*Wavelet methods*: The wavelets package includes computing wavelet filters, wavelet transforms and multiresolution analyses. Multiresolution forecasting using wavelets is also implemented in mrf. WaveletComp provides some tools for wavelet-based analysis of univariate and bivariate time series including cross-wavelets, phase-difference and significance tests. biwavelet is a port of the WTC Matlab package for univariate and bivariate wavelet analyses. mvLSW provides tools for multivariate locally stationary wavelet processes. Tests of white noise using wavelets are provided by hwwntest. Wavelet scalogram tools are contained in wavScalogram. Further wavelet methods can be found in the packages rwt, waveslim, wavethresh.*Harmonic regression*using Fourier terms is implemented in HarmonicRegression. The fable and forecast packages also provide some simple harmonic regression facilities via the`fourier`

function.

**Decomposition and Filtering**

*Filters and smoothing*:`filter()`

in stats provides autoregressive and moving average linear filtering of multiple univariate time series. The robfilter package provides several robust time series filters.`smooth()`

from the stats package computes Tukey's running median smoothers, 3RS3R, 3RSS, 3R, etc. sleekts computes the 4253H twice smoothing method. mFilter implements several filters for smoothing and extracting trend and cyclical components including Hodrick-Prescott and Butterworth filters. smoots provides nonparametric estimation of the time trend and its derivatives.*Decomposition*: Seasonal decomposition is discussed below. Autoregressive-based decomposition is provided by ArDec. tsdecomp implements ARIMA-based decomposition of quarterly and monthly data. rmaf uses a refined moving average filter for decomposition.*Singular Spectrum Analysis*is implemented in Rssa and ASSA.*Empirical Mode Decomposition*(EMD) and Hilbert spectral analysis is provided by EMD. Additional tools, including ensemble EMD, are available in hht. An alternative implementation of ensemble EMD and its complete variant are available in Rlibeemd.

**Seasonality**

*Seasonal decomposition*: the stats package provides classical decomposition in`decompose()`

, and STL decomposition in`stl()`

. Enhanced STL decomposition is available in stlplus. stR provides Seasonal-Trend decomposition based on Regression. smooth and tsutils implement extended versions of classical decomposition.- X-13-ARIMA-SEATS binaries are provided in the x13binary package, with seasonal providing an R interface and seasonalview providing a GUI. An alternative interface is provided by x12.
- An interface to the JDemetra+ seasonal adjustment software is provided by RJDemetra. ggdemetra provides associated ggplot2 functions.
- Seasonal adjustment of daily time series, allowing for day-of-week, time-of-month, time-of-year and holiday effects is provided by dsa.
*Analysis of seasonality*: the bfast package provides methods for detecting and characterizing abrupt changes within the trend and seasonal components obtained from a decomposition. npst provides a generalization of Hewitt's seasonality test.- season: Seasonal analysis of health data including regression models, time-stratified case-crossover, plotting functions and residual checks.
- seas: Seasonal analysis and graphics, especially for climatology.
- deseasonalize: Optimal deseasonalization for geophysical time series using AR fitting.
- sazedR: Method to estimate the period of a seasonal time series.

**Stationarity, Unit Roots, and Cointegration**

*Stationarity and unit roots*: tseries provides various stationarity and unit root tests including Augmented Dickey-Fuller, Phillips-Perron, and KPSS. Alternative implementations of the ADF and KPSS tests are in the urca package, which also includes further methods such as Elliott-Rothenberg-Stock, Schmidt-Phillips and Zivot-Andrews tests. uroot provides seasonal unit root tests. CADFtest provides implementations of both the standard ADF and a covariate-augmented ADF (CADF) test. MultipleBubbles tests for the existence of bubbles based on Phillips-Shi-Yu (2015).*Local stationarity*: locits provides a test of local stationarity and computes the localized autocovariance. Time series costationarity determination is provided by costat. LSTS has functions for locally stationary time series analysis. Locally stationary wavelet models for nonstationary time series are implemented in wavethresh (including estimation, plotting, and simulation functionality for time-varying spectra).*Cointegration*: The Engle-Granger two-step method with the Phillips-Ouliaris cointegration test is implemented in tseries and urca. The latter additionally contains functionality for the Johansen trace and lambda-max tests. tsDyn provides Johansen's test and AIC/BIC simultaneous rank-lag selection. Parameter estimation and inference in a cointegrating regression are implemented in cointReg. nardl estimates nonlinear cointegrating autoregressive distributed lag models.

**Nonlinear Time Series Analysis**

*Nonlinear autoregression*: Tools for nonlinear time series analysis are provided in NTS including threshold autoregressive models, Markov-switching models, convolutional functional autoregressive models, and nonlinearity tests. Various forms of nonlinear autoregression are available in tsDyn including additive AR, neural nets, SETAR and LSTAR models, threshold VAR and VECM. Neural network autoregression is also provided in GMDH. nnfor provides time series forecasting with neural networks. NlinTS includes neural network VAR, and a nonlinear version of the Granger causality test based on feedforward neural networks. bentcableAR implements Bent-Cable autoregression. BAYSTAR provides Bayesian analysis of threshold autoregressive models. Mixture AR models are implemented in mixAR and uGMAR.- tseriesChaos
provides an R implementation of the algorithms from the
*TISEAN project*. DChaos provides several algorithms for detecting chaotic signals inside univariate time series. - Autoregression Markov switching models are provided in MSwM, while dependent mixtures of latent Markov models are given in depmix and depmixS4 for categorical and continuous time series.
*Tests*: Various tests for nonlinearity are provided in fNonlinear. tseriesEntropy tests for nonlinear serial dependence based on entropy metrics.- Additional functions for nonlinear time series are available in nlts and nonlinearTseries.

**Entropy**

- RTransferEntropy measures information flow between time series with Shannon and Renyi transfer entropy.
- An entropy measure based on the Bhattacharya-Hellinger-Matusita distance is implemented in tseriesEntropy.
- Various approximate and sample entropies are computed using TSEntropies.

**Dynamic Regression Models**

*Dynamic linear models*: A convenient interface for fitting dynamic regression models via OLS is available in dynlm; an enhanced approach that also works with other regression functions and more time series classes is implemented in dyn. More advanced dynamic system equations can be fitted using dse. Gaussian linear state space models can be fitted using dlm (via maximum likelihood, Kalman filtering/smoothing and Bayesian methods), or using bsts which uses MCMC. dLagM provides time series regression with distributed lags. Functions for distributed lag nonlinear modelling are provided in dlnm. sym.arma will fit ARMA models with regressors where the observations follow a conditional symmetric distribution.*Time-varying parameter*models can be fitted using the tpr package.- greybox provides several tools for modelling and forecasting with dynamic regression models.

**Multivariate Time Series Models**

*Vector autoregressive (VAR) models*are provided via`ar()`

in the basic stats package including order selection via the AIC. These models are restricted to be stationary. MTS is an all-purpose toolkit for analyzing multivariate time series including VAR, VARMA, seasonal VARMA, VAR models with exogenous variables, multivariate regression with time series errors, and much more. Possibly non-stationary VAR models are fitted in the mAr package, which also allows VAR models in principal component space. sparsevar allows estimation of sparse VAR and VECM models, bigtime estimates large sparse VAR, VARX and VARMA models, while BigVAR estimates VAR and VARX models with structured lasso penalties and svars implements data-driven structural VARs. Shrinkage estimation methods for VARs are implemented in VARshrink. More elaborate models are provided in package vars, tsDyn,`estVARXls()`

in dse. Another implementation with bootstrapped prediction intervals is given in VAR.etp. bvartools assists in the set-up of Bayesian VAR models, while BMTAR implements Baysian Multivariate Threshold AR models with missing data. mfbvar includes tools for estimating mixed-frequency Bayesian VAR models. BVAR provides a toolkit for hierarchical Bayesian VAR models. BGVAR implements Bayesian Global VAR models. mlVAR provides multi-level vector autoregression. VARsignR provides routines for identifying structural shocks in VAR models using sign restrictions. gmvarkit estimates Gaussian mixture VAR models. GNAR provides methods for fitting network AR models, while graphicalVAR estimates graphical VAR models. gdpc implements generalized dynamic principal components. pcdpca extends dynamic principal components to periodically correlated multivariate time series. onlineVAR implements online fitting of time-adaptive lasso VARs. mgm estimates time-varying mixed graphical models and mixed VAR models via regularized regression.*VARIMA models*and*state space models*are provided in the dse package.*Vector error correction models*are available via the urca, ecm, vars, tsDyn packages, including versions with structural constraints and thresholding.*Vector exponential smoothing*is provided by smooth.*Time series component analysis*: ForeCA implements forecastable component analysis by searching for the best linear transformations that make a multivariate time series as forecastable as possible. PCA4TS finds a linear transformation of a multivariate time series giving lower-dimensional subseries that are uncorrelated with each other. HDTSA provides procedures for several high-dimensional time series analysis tools. One-sided dynamic principal components are computed in odpc. Frequency-domain-based dynamic PCA is implemented in freqdom. tsBSS provides blind source separation and supervised dimension reduction for time series.*Multivariate state space models*An implementation is provided by the KFAS package which provides a fast multivariate Kalman filter, smoother, simulation smoother and forecasting. FKF provides a fast and flexible implementation of the Kalman filter, which can deal with missing values. FKF.SP implements fast Kalman filtering through sequential processing. Another implementation is given in the dlm package which also contains tools for converting other multivariate models into state space form. mssm also provides methods for multivariate state space models. MARSS fits constrained and unconstrained multivariate autoregressive state-space models using an EM algorithm. mbsts provides tools for multivariate Bayesian structural time series models. All of these packages assume the observational and state error terms are uncorrelated.*Partially-observed Markov processes*are a generalization of the usual linear multivariate state space models, allowing non-Gaussian and nonlinear models. These are implemented in the pomp package.- Multivariate stochastic volatility models (using latent factors) are provided by factorstochvol.

**Analysis of large groups of time series**

*Time series features*are computed in feasts for time series in`tsibble`

format. They are computed using tsfeatures for a list or matrix of time series in`ts`

format. In both packages, many built-in feature functions are included, and users can add their own. Rcatch22 provides fast computation of 22 features identified as particularly useful. fsMTS implements feature selection routines for multivariate time series.*Time series clustering*is implemented in TSclust, dtwclust, BNPTSclust and pdc.- TSdist provides distance measures for time series data.
- TSrepr includes methods for representing time series using dimension reduction and feature extraction.
- rucrdtw provides R bindings for functions from the UCR Suite to enable ultrafast subsequence search for a best match under Dynamic Time Warping and Euclidean Distance. IncDTW provides incremental calculation of dynamic time warping for streaming time series.
- Methods for plotting and forecasting collections of hierarchical and grouped time series are provided by fable and hts. thief uses hierarchical methods to reconcile forecasts of temporally aggregated time series. FoReco provides various forecast reconciliation methods for cross-sectional, temporal, and cross-temporal constrained time series. An alternative approach to reconciling forecasts of hierarchical time series is provided by gtop. ProbReco provides tools to train forecast reconciliation weights by optimizing probability scoring functions.

**Functional time series**

- Tools for visualizing, modeling, forecasting and analysing functional time series are implemented in ftsa. NTS also implements functional autoregressive models. Seasonal functional autoregression models are provided by Rsfar. fpcb implements predictive confidence bands for functional time series.
- fdaACF estimates the autocorrelation function for functional time series.
- freqdom.fda provides implements of dynamical functional principal components for functional time series.
- STFTS contains stationarity, trend and unit root tests for functional time series.
- wwntests provides an array of white noise hypothesis tests for functional data.

**Matrix and tensor-valued time series**

- tensorTS provides functions for estimation, simulation and prediction of factor and autoregressive models for matrix and tensor valued time series.

**Continuous time models**

- carfima allows for continuous-time ARFIMA models.
- Sim.DiffProc simulates and models stochastic differential equations.
- Simulation and inference for stochastic differential equations is provided by sde and yuima.

**Resampling**

*Bootstrapping*: The boot package provides function`tsboot()`

for time series bootstrapping, including block bootstrap with several variants. blocklength allows for selecting the optimal block-length for a dependent bootstrap.`tsbootstrap()`

from tseries provides fast stationary and block bootstrapping. Maximum entropy bootstrap for time series is available in meboot. timesboot computes the bootstrap CI for the sample ACF and periodogram. BootPR computes bias-corrected forecasting and bootstrap prediction intervals for autoregressive time series. bootUR implements bootstrap unit root tests.

**Time Series Data**

- Various data sets in tsibble format are provided by tsibbledata.
- Data from Cryer and Chan (2010, 2nd ed)
*Time series analysis with applications in R*are in the TSA package. - Data from Hyndman and Athanasopoulos (2018, 2nd ed)
*Forecasting: principles and practice*are in the fpp2 package. - Data from Hyndman and Athanasopoulos (2021, 3rd ed)
*Forecasting: principles and practice*are in the fpp3 package. - Data from Hyndman, Koehler, Ord and Snyder (2008)
*Forecasting with exponential smoothing*are in the expsmooth package. - Data from Makridakis, Wheelwright and Hyndman (1998, 3rd ed)
*Forecasting: methods and applications*are in the fma package. - Data from Shumway and Stoffer (2017, 4th ed)
*Time Series Analysis and Its Applications: With R Examples*are in the astsa package. - Data from Tsay (2005, 2nd ed)
*Analysis of Financial Time Series*are in the FinTS package. - Data from Woodward, Gray, and Elliott (2016, 2nd ed)
*Applied Time Series Analysis with R*are in the tswge package. - AER and Ecdat both contain many data sets (including time series data) from many econometrics text books
- Data from the M-competition and M3-competition are provided in the Mcomp package. Tcomp provides data from the 2010 IJF Tourism Forecasting Competition.
*National time series data:*readabs downloads, imports and tidies time series data from the*Australian*Bureau of Statistics. BETS provides access to the most important economic time series in*Brazil*. bundesbank allows access to the time series databases of the*German*central bank. Data from*Switzerland*via dataseries.org can be downloaded and imported using dataseries. ugatsdb provides an API to access time series data for*Uganda*.*Time series data bases:*fame provides an interface for FAME time series databases. Economic time series and other data from FRED (the Federal Reserve Economic Data) can be retrieved using fredr. rdbnomics provides access to hundreds of millions of time series from DBnomics. influxdbr provides an interface to the InfluxDB time series database. pdfetch provides facilities for downloading economic and financial time series from public sources. Data from the Quandl online portal to financial, economical and social datasets can be queried interactively using the Quandl package. TSdbi provides a common interface to time series databases. tsdb implements a simple data base for numerical time series.*Synthetic data*are produced by`simulate()`

in forecast package or`generate()`

in fable, given a specific model. gratis generates new time series with diverse and controllable characteristics using mixture autoregression models. synthesis generates synthetic time series from commonly used statistical models, including linear, nonlinear and chaotic systems. tssim flexibly simulates daily or monthly time series using seasonal, calendar, and outlier components.

**Miscellaneous**

- dtw: Dynamic time warping algorithms for computing and plotting pairwise alignments between time series.
- EBMAforecast: Ensemble Bayesian model averaging forecasts using Gibbs sampling or EM algorithms.
- ensembleBMA: Bayesian Model Averaging to create probabilistic forecasts from ensemble forecasts and weather observations.
- earlywarnings: Early warnings signals toolbox for detecting critical transitions in time series
- FeedbackTS: Analysis of fragmented time directionality to investigate feedback in time series.
- gsignal is an R implementation of the Octave package "signal", containing a variety of signal processing tools.
- ifultools is a collection of efficient signal processing, image processing, and time series modeling routines.
- imputePSF: imputes missing data using pattern sequences.
- LPStimeSeries aims to find "learned pattern similarity" for time series.
- nets: routines for the estimation of sparse long run partial correlation networks for time series data.
- paleoTS: Modeling evolution in paleontological time series.
- pastecs: Regulation, decomposition and analysis of space-time series.
- PSF: Forecasting univariate time series using pattern-sequences.
- ptw: Parametric time warping.
- RGENERATE provides tools to generate vector time series.
- RMAWGEN is set of S3 and S4 functions for spatial multi-site stochastic generation of daily time-series of temperature and precipitation making use of VAR models. The package can be used in climatology and statistical hydrology.
- RSEIS: Seismic time series analysis tools.
- rts: Raster time series analysis (e.g., time series of satellite images).
- spTimer: Spatio-temporal Bayesian modelling.
- surveillance: Temporal and spatio-temporal modeling and monitoring of epidemic phenomena.
- Tides: Functions to calculate characteristics of quasi periodic time series, e.g. observed estuarine water levels.
- tiger: Temporally resolved groups of typical differences (errors) between two time series are determined and visualized.
- tsfknn: Time series forecasting with k-nearest-neighbours.
- TSMining: Mining Univariate and Multivariate Motifs in Time-Series Data.
- tsModel: Time series modeling for air pollution and health.

- Task view: Finance
- Task view: Econometrics
- Task view: Environmetrics
- TISEAN Project
- GitHub repository for this Task View

5 years ago by Fernanda L. Schumacher

Fitting Univariate Censored Linear Regression Model with Autoregressive Errors

3 years ago by JQ Veenstra

Fractional ARIMA (and Other Long Memory) Time Series Modeling

7 months ago by Asael Alonzo Matamoros

Bayesian Time Series Modeling with Stan

8 years ago by Edward M.H. Lin

On Bayesian analysis of Threshold autoregressive model (BAYSTAR)

7 years ago by Grace Chiu

Bent-Cable Regression for Independent Data or Autoregressive Time Series

2 years ago by Will Nicholson

Dimension Reduction Methods for Multivariate Time Series

8 months ago by Tarik C. Gouhier

Conduct Univariate and Bivariate Wavelet Analyses

8 months ago by Alec Stashevsky

Select an Optimal Block-Length to Bootstrap Dependent Data (Block Bootstrap)

a year ago by Andrey Duvan Rincon Torres

Bayesian Approach for MTAR Models with Missing Data

2 years ago by David Alejandro Martell Juarez

A Bayesian Nonparametric Algorithm for Time Series Clustering

8 years ago by Jae H. Kim

Bootstrap Prediction Intervals and Bias-Corrected Forecasting

7 months ago by Yining Chen

Methods for Fast Multiple Change-Point Detection and Estimation

5 months ago by Nicholas Tierney

Browse Over Longitudinal Data Graphically and Analytically in R

2 months ago by Jouni Helske

Bayesian Inference of Non-Linear and Non-Gaussian State Space Models

3 days ago by Franz X. Mohr

Bayesian Inference of Vector Autoregressive and Error Correction Models

5 years ago by Claudio Lupi

A Package to Perform Covariate Augmented Dickey-Fuller Unit Root Tests

2 years ago by Hyungsuk Tak

Continuous-Time Fractionally Integrated ARMA Process for Irregularly Spaced Long-Memory Time Series Data

2 years ago by Thomas Grundy

Geometrically Inspired Multivariate Changepoint Detection

6 years ago by Philipp Aschersleben

Parameter Estimation and Inference in a Cointegrating Regression

8 months ago by Michail Tsagris

Distance Covariance and Correlation for Time Series Analysis

8 months ago by Ingmar Visser

Dependent Mixture Models - Hidden Markov Models of GLMs and Other Distributions in S4

9 years ago by A. I. McLeod

Optimal deseasonalization for geophysical time series using AR fitting

6 months ago by Haydar Demirhan

Time Series Regression Models with Distributed Lag Models

4 years ago by Giovanni Petris

Bayesian and Likelihood Analysis of Dynamic Linear Models

3 months ago by Gerold Hepp

A Class for Working with Time Series Data Based on 'data.table' and 'R6' with Largely Optional Reference Semantics

12 days ago by Alexis Sarda

Time Series Clustering Along with Optimizations for the Dynamic Time Warping Distance

4 years ago by Petr Shevtsov

Interface to 'Dygraphs' Interactive Time Series Charting Library

8 years ago by Vasilis Dakos

Early Warning Signals Toolbox for Detecting Critical Transitions in Timeseries

a year ago by Florian M. Hollenbach

Estimate Ensemble Bayesian Model Averaging Forecasts using Gibbs Sampling or EM-Algorithms

a year ago by Wenyu Zhang

Non-Parametric Multiple Change-Point Analysis of Multivariate Data

2 months ago by Chris Fraley

Probabilistic Forecasting using Ensembles and Bayesian Model Averaging

7 years ago by Rob J Hyndman

Data Sets from "Forecasting with Exponential Smoothing"

2 months ago by Mitchell O'Hara-Wild

Core Tools for Packages in the 'fable' Framework

2 months ago by Gregor Kastner

Bayesian Estimation of (Sparse) Latent Factor Stochastic Volatility Models

6 months ago by Guy J. Abel

Visualisation of Sequential Probability Distributions Using Fan Charts

a year ago by Guillermo Mestre Marcos

Autocorrelation Function for Functional Time Series

8 months ago by Mitchell O'Hara-Wild

Feature Extraction and Statistics for Time Series

2 years ago by Tobias Setz

Rmetrics - Autoregressive Conditional Heteroskedastic Modelling

3 years ago by Georgi N. Boshnakov

Companion to Tsay (2005) Analysis of Financial Time Series

2 years ago by Rob Hyndman

Data Sets from "Forecasting: Methods and Applications" by Makridakis, Wheelwright & Hyndman (1998)

4 years ago by Tobias Setz

Rmetrics - Nonlinear and Chaotic Time Series Modelling

a year ago by David Shaub

Convenient Functions for Ensemble Time Series Forecasts

2 years ago by Nickalus Redell

Time Series Forecasting with Machine Learning Methods

8 months ago by Nicolás Hernández

Predictive Confidence Bands for Functional Time Series Forecasting

a year ago by Rob Hyndman

Data for "Forecasting: Principles and Practice" (3rd Edition)

2 years ago by Martin Maechler

Fractionally Differenced ARIMA aka ARFIMA(P,d,q) Models

4 years ago by Kidzinski L.

Functional Time Series: Dynamic Functional Principal Components

3 months ago by Richard Hunt

Fitting and Forecasting Gegenbauer ARMA Time Series Models

a year ago by Alain Quartier-la-Tente

'ggplot2' Extension for Seasonal and Trading Day Adjustment with 'RJDemetra'

4 years ago by William T.M. Dunsmuir

Generalized Linear Autoregressive Moving Average Models

6 days ago by Savi Virolainen

Estimate Gaussian and Student's t Mixture Vector Autoregressive Models

11 days ago by Yanfei Kang

Generating Time Series with Diverse and Controllable Characteristics

2 years ago by Sayani Gupta

Explore Probability Distributions for Bivariate Temporal Granularities

a year ago by Olivier Briet

Two Functions for Generalized SARIMA Time Series Simulation

7 years ago by Paal O. Westermark

Harmonic Regression to One or more Time Series

6 years ago by Neeraj Bokde

Impute Missing Data in Time Series Data with PSF Based Method

3 years ago by Marcus W. Beck

Test Bench for the Comparison of Imputation Methods

4 months ago by Maximilian Leodolter

Incremental Calculation of Dynamic Time Warping

2 years ago by Tengyao Wang

High-Dimensional Changepoint Estimation via Sparse Projection

8 months ago by Jouni Helske

Kalman Filter and Smoother for Exponential Family State Space Models

7 years ago by Javier López-de-Lacalle

Kalman Filter, Smoother and Disturbance Smoother

7 years ago by Mustafa Gokce Baydogan

Learned Pattern Similarity and Representation for Time Series

a month ago by Elizabeth Holmes - NOAA Federal

Multivariate Autoregressive State-Space Modeling

3 months ago by Matt Dancho

Ensemble Algorithms for Time Series Forecasting with Modeltime

8 months ago by Ruey S. Tsay

All-Purpose Toolkit for Analyzing Multivariate Time Series (MTS) and Estimating Multivariate Volatility Models

3 years ago by Pedro Araujo

Test and Detection of Explosive Behaviors for Time Series

5 months ago by Daniel Grose

Multivariate, Locally Stationary Wavelet Process Estimation

a year ago by Taha Zaghdoudi

Nonlinear Cointegrating Autoregressive Distributed Lag Model

5 months ago by T. R. dos Santos

Non-Gaussian State-Space with Exact Marginal Likelihood

a year ago by Youssef Hmamouche

Models for Non Linear Causality Detection in Time Series

a year ago by Benjamin Groebe

Methods for Fitting and Simulating Non-Stationary ARFIMA Models

3 years ago by Jakob Messner

Online Fitting of Time-Adaptive Lasso Vector Auto Regression

4 years ago by Philippe Grosjean

Package for Analysis of Space-Time Ecological Series

4 years ago by Lukasz Kidzinski

Dynamic Principal Components for Periodically Correlated Functional Time Series

13 days ago by Georgi N. Boshnakov

Periodically Correlated and Periodically Integrated Time Series

a month ago by Abiel Reinhart

Fetch Economic and Financial Time Series Data from Public Sources

12 days ago by Aaron A. King

Statistical Inference for Partially Observed Markov Processes

a year ago by Esam Mahdi

Portmanteau Tests for Univariate and Multivariate Time Series Models

a year ago by Anastasios Panagiotelis

Score Optimal Probabilistic Forecast Reconciliation

3 months ago by Jonathan Berrisch

Probabilistic Forecast Combination Using CRPS Learning

2 years ago by Andrew J. Barbour

Adaptive, Sine-Multitaper Power Spectral Density and Cross Spectrum Estimation

5 years ago by Neeraj Bokde

Forecasting of Univariate Time Series Using the Pattern Sequence-Based Forecasting (PSF) Algorithm

4 months ago by Trent Henderson

Calculation of 22 CAnonical Time-Series CHaracteristics

a month ago by Matt Cowgill

Download and Tidy Time Series Data from the Australian Bureau of Statistics

5 years ago by Ben Powell

Non-Parametric Bayesian Spectrum Estimation for Multirate Data

2 months ago by Alain Quartier-la-Tente

Interface to 'JDemetra+' Seasonal Adjustment Software

3 years ago by Christoph Bergmeir

Bayesian Exponential Smoothing Models with Trend Modifications

4 months ago by Jouni Helske

Ensemble Empirical Mode Decomposition (EEMD) and Its Complete Variant (CEEMDAN)

6 months ago by Daniel Grose

Innovative and/or Additive Outlier Robust Kalman Filtering

4 months ago by Anton Korobeynikov

A Collection of Methods for Singular Spectrum Analysis

10 months ago by David Zimmermann

Measuring Information Flow Between Time Series with Shannon and Renyi Transfer Entropy

a year ago by Tiago Santos

Parameter-Free Domain-Agnostic Season Length Detection in Time Series

a year ago by Fabian Krueger

Scoring Rules for Parametric and Simulated Distribution Forecasts

6 years ago by Stefano Maria Iacus

Simulation and Inference for Stochastic Differential Equations

4 months ago by Dominik Schulz

Nonparametric Estimation of the Trend and Its Derivatives in TS

2 months ago by Darjus Hosszejni

Efficient Bayesian Inference for Stochastic Volatility (SV) Models

2 months ago by Dainius Masiliunas

Testing, Monitoring, and Dating Structural Changes: C++ Version

10 months ago by Sebastian Meyer

Temporal and Spatio-Temporal Modeling and Monitoring of Epidemic Phenomena

3 years ago by Vinicius Quintas Souto Maior

Autoregressive and Moving Average Symmetric Models

2 years ago by Christoph Sax

Methods for Temporal Disaggregation and Interpolation of Time Series

3 years ago by 'Matthias Bannert'

Manage Time Series for Official Statistics with R and PostgreSQL

6 months ago by Markus Matilainen

Blind Source Separation and Supervised Dimension Reduction for Time Series

5 years ago by Simone Giannerini

Entropy Based Analysis and Tests for Time Series

2 years ago by Jouni Helske

Improved Prediction Intervals for ARIMA Processes and Structural Time Series

8 years ago by Alberto Lopez Moreno

Fitting and Predict Time Series Interactive Laboratory

2 years ago by Nikolaos Kourentzes

Time Series Exploration, Modelling and Forecasting

14 hours ago by Savi Virolainen

Estimate Univariate Gaussian and Student's t Mixture Autoregressive Models

2 years ago by Namgil Lee

Shrinkage Estimation Methods for Vector Autoregressive Models

6 years ago by Christian Danne

Sign Restrictions, Bayesian, Vector Autoregression Models

2 years ago by Eric Aldrich

Functions for Computing Wavelet Filters, Wavelet Transforms and Multiresolution Analyses

2 years ago by Brandon Whitcher

Basic Wavelet Routines for One-, Two-, and Three-Dimensional Signal Processing

6 months ago by Vicente J. Bolos

Wavelet Scalogram Tools for Time Series Analysis

10 years ago by Thomas J. Fisher

Weighted Portmanteau Tests for Time Series Goodness-of-fit

15 hours ago by Alexander Kowarik

Interface to 'X12-ARIMA'/'X13-ARIMA-SEATS' and Structure for Batch Processing of Seasonal Adjustment

5 months ago by Dirk Eddelbuettel

Provide the 'x13ashtml' Seasonal Adjustment Binary

a year ago by Achim Zeileis

S3 Infrastructure for Regular and Irregular Time Series (Z's Ordered Observations)