| Maintainer: | Rob J Hyndman, Rebecca Killick |
| Contact: | Rob.Hyndman at monash.edu |
| Version: | 2025-12-12 |
| URL: | https://CRAN.R-project.org/view=TimeSeries |
| Source: | https://github.com/cran-task-views/TimeSeries/ |
| Contributions: | Suggestions and improvements for this task view are very welcome and can be made through issues or pull requests on GitHub or via e-mail to the maintainer address. For further details see theContributing guide. |
| Citation: | Rob J Hyndman, Rebecca Killick (2025). CRAN Task View: Time Series Analysis. Version 2025-12-12. URL https://CRAN.R-project.org/view=TimeSeries. |
| Installation: | The packages from this task view can be installed automatically using thectv package. For example,ctv::install.views("TimeSeries", coreOnly = TRUE) installs all the core packages orctv::update.views("TimeSeries") installs all packages that are not yet installed and up-to-date. See theCRAN Task View Initiative for more details. |
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 overlap between the tools for time series and those designed for specific domains includingEconometrics,Finance andEnvironmetrics, or specific problems such asAnomalyDetection.
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, either via e-mail to the maintainer or by submitting an issue or pull request in the GitHub repository linked above.
"ts" that can represent regularly spaced time series (using numeric time stamps). Hence, it is particularly well-suited for annual, monthly, quarterly data, etc.ma fromforecast, androllmean fromzoo. The latter also provides a general functionrollapply, 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 providesslide_tsibble() for rolling statistics,tile_tsibble() for non-overlapping sliding windows, andstretch_tsibble() for expanding windows.tbrf provides rolling functions based on date and time windows instead of n-lagged observations.roll provides fast and efficient computation of rolling and expanding statistics for time-series data using online algorithms and parallelized C++ code with support for weights and missing values.runner provides tools for running any R function in rolling windows or date windows.runstats provides fast computational methods for some running sample statistics. Fordata.table,froll() can be used for high-performance rolling statistics.plot() applied tots objects. (Partial) autocorrelation functions plots are implemented inacf() andpacf(). Alternative versions are provided byAcf() andPacf() inforecast, along with a combination display usingtsdisplay(). Seasonal displays are obtained usingmonthplot() in stats,seasonplot inforecast, andseasplot intsutils.feasts provides 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 bytsibbletalk.dCovTS computes and plots the distance covariance and correlation functions of time series.gglinedensity provides a ggplot2 statistic for DenseLines heatmaps of time series normalized by arc length. Calendar plots are implemented insugrrants.gravitas allows for visualizing probability distributions conditional on bivariate temporal granularities.dygraphs provides an interface to the Dygraphs interactive time series charting library. Alternative interactive time series visualizations using the vis.js Timeline library are provided bylinevis.TSstudio also provides some interactive visualization tools for time series.ZRA plots forecast objects from theforecast package using dygraphs. Basic fan plots of forecast distributions are provided byforecast andvars. More flexible fan plots of any sequential distributions are implemented infanplot."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 seeR Help Desk: Date and Time Classes in R by Gabor Grothendieck and Thomas Petzoldt inR News 4(1), 29-32."yearmon" and"yearqtr" fromzoo allow for more convenient computation with monthly and quarterly observations, respectively."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.dates(),hours() and date/time (intraday) inchron(). There is no support for time zones and daylight savings time. Internally,"chron" objects are (fractional) days since 1970-01-01."POSIXct" and"POSIXlt" implement the POSIX standard for date/time (intraday) 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. Packagelubridate provides functions that facilitate certain POSIX-based computations, whileclock provides a comprehensive library for date-time manipulations using a new family of orthogonal date-time classes (durations, time points, zoned-times, and calendars). Theanytime package converts various inputs intoPOSIXct orDate objects. Various recurrent calendar calculations are possibly usingalmanac.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 ways."timeDate" is provided in thetimeDate 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.qlcal allows access to various financial exchange calendars via QuantLib."ti" class for time/date information."mondate" class from themondate package facilitates computing with dates in terms of months."ts" is the basic class for regularly spaced time series using numeric time stamps."ts".shift() for lead/lag operations. Further basic time series functionalities are offered byDTSg which is based ondata.table.dtts provides high-frequency time series support viananotime anddata.table."POSIXct" time stamps, intended especially for financial applications. These include"irts" fromtseries."timeSeries" intimeSeries (previously: fSeries) implements time series with"timeDate" time stamps."tis" intis implements time series with"ti" time stamps.ts objects to PostgreSQL relations.tsibble format.fabletools provides tools for extending thefable framework.ts objects, whilemodeltime provides time series forecasting tools for use with the ‘tidymodels’ ecosystem. Forecast resampling tools for use withmodeltime are provided bymodeltime.resample.HoltWinters() in stats provides some basic models with partial optimization,ETS() fromfable andets() fromforecast provide a larger set of models and facilities with full optimization.smooth implements some generalizations of exponential smoothing.legion implements multivariate versions of exponential smoothing. TheMAPA package combines exponential smoothing models at different levels of temporal aggregation to improve forecast accuracy. Some Bayesian extensions of exponential smoothing are contained inRlgt.THETA() function fromfable,thetaf() function fromforecast, andtheta() fromtsutils. An alternative and extended implementation is provided inforecTheta.ar() in stats (with model selection).arima() in stats is the basic function for ARIMA, SARIMA, RegARIMA, and subset ARIMA models. It is enhanced in thefable package via theARIMA() function which allows for automatic modelling. Similar functionality is provided in theforecast package via theauto.arima() function.arma() in thetseries package provides different algorithms for ARMA and subset ARMA models. Other estimation methods including the innovations algorithm are provided byitsmr.arima2 provides a random-restart estimation algorithm to replacestats::arima(). Other estimation methods including the innovations algorithm are provided byitsmr. Packagegsarima contains functionality for Generalized SARIMA time series simulation.bayesforecast fits Bayesian time series models including seasonal ARIMA and ARIMAX models.BayesARIMAX implements Bayesian estimation of ARIMAX models. Robust ARIMA modeling is provided in therobustarima package. Themar1s 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 bytsPI. ARIMA models with multiple seasonal periods can be handled withtfarima andsmooth.arfima function in thearfima and thetfarima packages.StructTS() in stats, while automatic modelling and forecasting are provided byUComp andautostsm.statespacer implements univariate state space models including structural and SARIMA models. Bayesian structural time series models are implemented inbsts andbayesSSM. Robust Kalman filtering is provided byRobKF. Exact observation weights for the Kalman filter and smoother are available usingwex.garch() fromtseries fits basic GARCH models. Many variations on GARCH models are provided byrugarch andtsgarch. Other univariate GARCH packages includefGarch which implements ARIMA models with a wide class of GARCH innovations androbustGarch which provides robust GARCH(1,1) models.bayesforecast fits Bayesian time series models including several variations of GARCH models. There are many more GARCH packages described in theFinance task view.Box.test() in the stats package. Additional tests are given byportes,WeightedPortTest, andtestcorr .tsoutliers andtsclean functions in theforecast package provide some simple heuristic methods for identifying and correcting outliers.tsrobprep provides methods for replacing missing values and outliers using a model-based approach.ctbi implements a procedure to clean, decompose and aggregate time series.na.interp() from theforecast 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. Imputation methods for multivariate locally stationary time series are inmvLSWimpute.accuracy() function from thefable andforecast packages. Distributional forecast evaluation using scoring rules is available infable,scoringRules andscoringutils. The Diebold-Mariano test for comparing the forecast accuracy of two models is implemented in thedm.test() function inforecast.ForeComp generates a size-power tradeoff plot for a given Diebold-Mariano test. A multivariate version of the Diebold-Mariano test is provided bymultDM.tsutils implements the Nemenyi test for comparing forecasts.greybox providesro() for general rolling origin evaluation of forecasts.tstests implements several tests for time series goodness of fit and forecast evaluation.Fpsn() which implements a “Functional pruning segment neighborhood” dynamic programming algorithm (univariate data, square loss, computes best model for a certain number of changes/segments).fpop providesFpop() which implements a “Functional pruning optimal partitioning” dynamic programming algorithm (univariate data, square loss, computes best model for a certain penalty for each change), as well asmultiBinSeg() which is an efficient implementation of the popular binary segmentation heuristic (multi-variate data, Gaussian loss, computes sequence of models from 1 segment to a given max number of segments). A tidy framework for several changepoint detection algorithms is implemented intidychangepoint.spectrum() in the stats package, including the periodogram, smoothed periodogram and AR estimates. Bayesian spectral inference is provided bybspec,beyondWhittle andregspec.quantspec includes methods to compute and plot Laplace periodograms for univariate time series. The Lomb-Scargle periodogram for unevenly sampled time series is computed bylomb.peacots provides inference for periodograms using an Ornstein-Uhlenbeck state space model.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 inrhosa, including bispectrum, bicoherence, cross-bispectrum and cross-bicoherence.fourier function.filter() in stats provides autoregressive and moving average linear filtering of multiple univariate time series. Therobfilter 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. Several filters are provided bysignal including a Butterworth filter and a Savitsky-Golay filter.hpfilter implements one- and two-sided Hodrick-Prescott filters, whilejumps provides a Hodrick-Prescott filter with automatically selected jumps. An alternative to Hodrick-Prescott filtering is provided byneverhpfilter. Corbae-Ouliaris frequency domain filtering is implemented incorbouli.smoots provides nonparametric estimation of the time trend and its derivatives. Many trend estimation methods are implemented intrendseries, providing a pipe-friendly interface when working with data frames.decompose(), and STL decomposition instl(). Enhanced STL decomposition is available instlplus.stR provides Seasonal-Trend decomposition based on Regression.smooth andtsutils implement extended versions of classical decomposition.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 analysing 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 themAr package, which also allows VAR models in principal component space. Fractionally cointegrated VAR models are handled byFCVAR.bigtime estimates large sparse VAR, VARX and VARMA models, whileBigVAR estimates VAR and VARX models with structured lasso penalties andsvars andpvars implement methods for the data-driven identification of structural VARs.sstvars provides a toolkit for reduced form and structural smooth transition VARs. Shrinkage estimation methods for VARs are implemented inVARshrink. More elaborate models are provided in packagevars andtsDyn. Another implementation with bootstrapped prediction intervals is given inVAR.etp.bvartools assists in the set-up of Bayesian VAR models, whileBVAR andbayesianVARs provide toolkits for hierarchical Bayesian VAR models.bsvars andbsvarSIGNs include efficient algorithms for estimating Bayesian Structural VAR models, whilebpvars provides forecasting of panel data using Bayesian panel VARs. Bayesian VARs with stochastic volatility and time-varying parameters is provided bybvarsv.mtarm implements Bayesian Multivariate Threshold AR models. Factor-augmented VAR (FAVAR) models are estimated by a Bayesian method withFAVAR.BGVAR implements Bayesian Global VAR models.mlVAR provides multi-level vector autoregression.gmvarkit estimates Gaussian mixture VAR models. Network or graphical VAR models can be fitted inGNAR,graphicalVAR,NetVAR andtsnet.gdpc implements generalized dynamic principal components.mgm estimates time-varying mixed graphical models and mixed VAR models via regularized regression.nets provides estimation of sparse VARs using long run partial correlation networks for time series data. Factor-adjusted VARs using network estimation and forecasting for high-dimensional time series is implemented infnets.tsibble format. They are computed usingtsfeatures for a list or matrix of time series ints 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.theft calculates time series features from various R and Python packages, whiletheftdlc is a companion package providing analysis and visualization functions. Feature extraction for ordinal time series is provided byotsfeatures.tsboot() for time series bootstrapping, including block bootstrap with several variants.blocklength allows for selecting the optimal block-length for a dependent bootstrap.tsbootstrap() fromtseries provides fast stationary and block bootstrapping. Maximum entropy bootstrap for time series is available inmeboot.BootPR computes bias-corrected forecasting and bootstrap prediction intervals for autoregressive time series.bootUR implements bootstrap unit root tests.simulate() inforecast package orgenerate() infable, 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.