Call Us: US - +1 845 478 5244 | UK - +44 20 7193 7850 | AUS - +61 2 8005 4826

“Principles of Econometrics

Time series data and models

  • The TimeSeries task view provides much more detailed information about both basic time series infrastructure and time series models. Here, only the most important aspects relating to econometrics are briefly mentioned. Time series models for financial econometrics (e.g., GARCH, stochastic volatility models, or stochastic differential equations, etc.) are described in the Finance task view.
  • Infrastructure for regularly spaced time series : The class “ts” in package stats is R’s standard class for regularly spaced time series (especially annual, quarterly, and monthly data). It can be coerced back and forth without loss of information to “zooreg” from package zoo.
  • Infrastructure for irregularly spaced time series zoo provides infrastructure for both regularly and irregularly spaced time series (the latter via the class “zoo”) where the time information can be of arbitrary class. This includes daily series (typically with “Date” time index) or intra-day series (e.g., with “POSIXct” time index). An extension based on zoo geared towards time series with different kinds of time index is xts. Further packages aimed particularly at finance applications are discussed in the Finance task view.
  • Classical time series models : Simple autoregressive models can be estimated with ar() and ARIMA modeling and Box-Jenkins-type analysis can be carried out with arima() (both in the stats package). An enhanced version of arima() is in forecast.
  • Linear regression models : A convenience interface to lm() for estimating OLS and 2SLS models based on time series data is dynlm. Linear regression models with AR error terms via GLS is possible using gls() from nlme.
  • Structural time series models : Standard models can be fitted with StructTS() in stats. Further packages are discussed in the TimeSeries task view.
  • Filtering and decomposition : decompose() and HoltWinters() in stats. The basic function for computing filters (both rolling and autoregressive) is filter() in stats. Many extensions to these methods, in particular for forecasting and model selection, are provided in the forecast package.
  • Vector autoregression : Simple models can be fitted by ar() in stats, more elaborate models are provided in package vars along with suitable diagnostics, visualizations etc. Panel vector autoregressions are available in panelvar.
  • Unit root and cointegration tests urcatseriesCADFtest. See also pco for panel cointegration tests.
  • Miscellaneous :
    • tsDyn – Threshold and smooth transition models.
    • PSTR – Panel smooth transition regression models.
    • midasr – MIDAS regression and other econometric methods for mixed frequency time series data analysis.
    • gets – GEneral-To-Specific (GETS) model selection for either ARX models with log-ARCH-X errors, or a log-ARCH-X model of the log variance.
    • tsfa – Time series factor analysis.
    • dlsem – Distributed-lag linear structural equation models.
    • apt – Asymmetric price transmission models.