Contents | Previous | Next | starting |

STSA, The Statistical Time Series Analysis Toolbox is installed in your O-Matrix installation directory. For example,

`\omwin\STSA`

. The
individual functions of the toolbox are divided into the ten sub-directories:
ARMA, BAYES, FILTER, NONLIN, NONPAR, OPTIMIZE, POD, SPECTRAL, RNG, and STATS.
These represent the main categories
of functionality for the toolbox.

The

The examples directory of your installation, (`omwin\stsa\examples`

)
includes numerous application
examples that provide in depth illustrations of the The functions in this directory can be used in the modeling (fitting, evaluation and forecasting) of univariate and multivariate stationary time series. For univariate time series analysis this directory has an extensive variety of functions for preliminary transformations, smoothing, testing for Gaussianity, descriptive statistics, order selection, estimation, residual diagnostics and forecasting. There is a complete set of functions for doing ARMA analysis according to the well known Box-Jenkins methodology. Many of these univariate analysis functions can be used, when applied in one variable at a time, in the context of multivariate time series analysis as well. For multivariate analysis there are functions for the classes of transfer function models and vector autoregressive models. A function for performing bivariate Granger-type causality analysis is also included. There are also two generic, unrestricted optimization functions, one for nonlinear least squares (gauss_newton) and one for nonlinear maximum likelihood (bhhh_ml) that can be used with a user-defined function for solving the corresponding estimation problems. The

`gauss_newton`

function is similar to the `nlsq`

function
of O-Matrix but it provides additional output, useful in the context of estimation.

Note I: The transfer function class is currently restricted to
bivariate time series (one output time series with one input time series).
Note II: See references [1] through [5] for extensive documentation for
these classes of models.

The functions provided for univariate time series analysis can:
- Create a matrix of sequential lags of a time series.
- Estimate and plot the autocovariance function (ACVF), autocorrelation function (ACF) and partial autocorrelation function (PACF).
- Estimate by conditional, nonlinear least squares the parameters of an ARIMA model (functions support bounds on the estimate coefficients) or an ARFIMA model.
- Select the order of an AR model using two model selection criteria (AICc and BIC).
- Compute the roots of the characteristic polynomials of an estimate ARIMA/ARFIMA model to check its stationarity and invertibility.
- Compute the coefficients in the infinite AR or MA representation of an ARIMA/ARFIMA model.
- Forecast (predict) future observations of the time series using an estimated model.
- Filter a time series using an estimated model.
- Check the model's adequacy via a variety of residual diagnostics (see below for auxiliary functions).

- Estimate the cross-correlation function (CCF) between pairs of time series.
- Estimate by conditional, nonlinear least squares the parameters of a TF model.
- Select the order of a VAR model using two model selection criteria.
- Estimate by conditional linear least squares the parameters of a VAR model.
- Forecast (predict) future observations of the time series using an estimated model.
- Check the model's adequacy via a variety of residual diagnostics (see below for auxiliary functions) applied to each individual residual series.

- Testing whether the residuals are white.
- Testing whether the residuals are normally distributed.
- Testing whether the residuals have outlying observations (via a box-plot).

This directory provides functions for the modeling (fitting and forecasting) of univariate time series following the Bayesian methodology outlined in reference [6]. The generic normal Dynamic Linear Model (DLM) and two of its simpler versions (first order polynomial DLM and regression through the origin DLM) are supported. With the functions provided the user can:

- Simulate a first order polynomial DLM.
- Initialize the Bayesian recursions using arbitrary priors or reference priors.
- Automatically check the observability of a DLM.
- Automatically construct the system and observation matrices for a number of popular DLMs, including DLMs for seasonal time series.
- Fit a variety of DLM models to a time series (function supports component discounting and unknown observational variances).
- Perform out of sample forecasting using the fitted DLM.
- Compute interval forecasts and standardized forecast errors.
- Evaluate the forecasting performance of a DLM using the mean squared and mean absolute values of the forecast errors.

Functions for filtering and forecasting of univariate time series

- Smoothing a time series using simple and exponential moving averages
- Smoothing and forecasting a time series using the Holt-Winters recursions
- Filter a time series using a generic finite impulse response filter
- Filter a time series using the Savitzky-Golay filter.
- Model, filter and forecast a time series using any time-invariant state-space model with the Kalman filter
- Estimate, filter and forecast a time series based on a trend+cyclical structural model

This directory provides functions for the modeling of some nonlinear univariate time series. Currently the directory supports the following: estimation of the parameters of GARCH model using maximum likelihood with either the Gaussian or Student's t-distribution (with fixed degrees of freedom), testing for linearity using an omnibus F-type test, bootstrapping a time series using the maximum entropy bootstrap, using the Kolmogorov-Smirnov test statistic in the context of time series, estimating a sign autoregressions and specifying and estimating a self-exciting threshold autoregressive (SETAR) model with a single threshold point. The SETAR model is a parametric model while a number of alternative semi- and non-parametric models are given in the NONPAR directory (see below). References [1], [4], [5], [7], [8], [9] an [11] contain extensive discussions and illustrations for these types of models. With the functions provided the user can:

- Compute sample quantiles at any probability level.
- Test for linearity of a time series.
- Compute and draw a scatterplot between two time series along with a nonparametric regression fit.
- Estimate a sign autoregression.
- Select the order, delay and threshold values for a SETAR model.
- Estimate by conditional, linear least squares the parameters of a selected SETAR model.
- Select the order, delay and bandwidth values for a FCAR model.
- Estimate by conditional, linear weighted least squares (WLS) the functional parameters of a selected FCAR model.
- Compute the sequence of one-step ahead forecasts from an estimated FCAR model.
- Compute multi-step ahead forecasts from a nonparametric autoregression.

The functions in this directory are an important addition to the STSA capabilities. This directory has redesigned functions for some of the previous non-parametric modeling capabilities that were in the NONLIN directory and has a number of additional functions that automate the specification, estimation and forecasting using advanced non-parametric models. Most of the models are directly designed and cross-tested using the material in reference [11]. The functions in this directory have two specific modeling advantages: they allow for the automated, data-dependent selection of the smoothing parameter (bandwidth) for non-parametric estimation using generalized or multifold cross-validation and they provide immediate forecasts from a number of alternative non-parametric models. In addition, there are functions for computing the density, distribution function and conditional density of a time series, as well as a function for extracting (and forecasting) conditional quantiles. Most of the functions have a plot option that allow for fast, easy plotting of some of the results. Estimation of all models is carried out with the Epanechnikov "optimal" kernel function although we retained the gaussian_kernel and optimal_kernel functions of the previous version for user-defined functions. Numerous new examples illustrate these functions.

- Estimate and forecast a time series using an autoregressive approximation and cubic splines, local polynomial smoothing or functional autoregression.
- Select the bandwidth for any of the above functions using multifold cross-validation.
- Estimate a generic non-parametric regression using cubic splines, local polynomial smoothing or functional regression.
- Select the bandwidth for local polynomial smoothing using generalized cross-validation.
- Estimate a generic partially linear model.
- Estimate and plot the density and distribution function of a time series.
- Estimate the conditional density of a time series and extract (and forecast) conditional quantiles.

There are 18 functions in this directory. They can be used to perform standard univariate spectral analysis and analysis of long-memory time series. See references [1], [4], [5] and [10]. In particular, with the functions provided the user can:

- Estimate the Fourier transform of a time series either using the discrete Fourier or the fast Fourier method.
- Estimate the periodogram of a time series from the Fourier transform.
- Plot the components of the Fourier transform and the periodogram.
- Smooth the periodogram of a time series to obtain its spectrum using a sine taper function.
- Estimate the periodogram of a time series using an autoregressive model approximation.
- Plot the estimated spectrum of a time series (whole or half - positive - frequency range).
- Compute the autocovariances of a fractional Brownian motion and a fractionally differenced time series.
- Simulate a fractional Brownian motion and fractionally differenced time series.
- Estimate the fractional order (Hurst exponent) of a time series via log-periodogram regression (Geweke and Porter-Hudak method).
- Jointly estimate the fractional order and ARMA coefficients of a fractional ARMA model (ARFIMA).
- Compute ARFIMA model forecasts.

Functions for generating random numbers from various statistical distributions.

Functions for nonlinear optimization not available in the main O-Matrix distribution

Various functions that aid in the analysis of time series data. This directory greatly extends the statistical capabilities of the main O-Matrix distribution.