INTRODUCTION
Autoregressive integrated moving average models (ARIMA) are one of the fundamental workhouse time-series models. If data follows a stochastic ARIMA process, past values have an effect on current values. Autoregressive models take the general form
where
and
The GAUSS TSMT application module provides a number of routines for performing pre-estimation data analysis, model parameter estimation, and post-estimation diagnosis of autoregressive time series. A natural starting point is simulating ARIMA data for estimation.
SIMULATE ARIMA DATA
Realizations of any ARIMA data generation process can be simulated using the GAUSS function simarmamt
. For example, consider a time series that follows the purely autoregressive data generation process given by:
// Load TSMT library library tsmt;
© 2024 Aptech Systems, Inc. All rights reserved.
// Specify ARMA Parameters b = { 0.5, -0.8 }; // Specify MA order q = 0; // Specify AR order p = 2; // Specify deterministic features (constant and trend) const = 1.5; tr = 0; // Number of observations n = 200; // Number of series to simulate // and number of columns of simulated data k = 1; // Standard deviation of the error terms std = 1; // Set seed for repeatable simulations seed = 5012; // Perform simulation y_sim = simarmamt(b, p, q, const, tr, n, k, std, seed);
The code above will produce a 200 x 1 matrix of data that follows the AR(2) data generating process specified. Each column of the matrix represents a different random realization of the process. The graph at the top of this tutorial shows the y_sim created by the above code.
CONCLUSION
You have learned how to use the simarmamt
function to simulate an AR model. The next tutorial demonstrates finding the ACF and PACF in GAUSS.