メインコンテンツ

Implement Box-Jenkins Model Selection and Estimation Using Econometric Modeler App

This example shows how to use the Box-Jenkins methodology to select and estimate an ARIMA model by using the Econometric Modeler app. Then, it shows how to forecast responses from the estimated model. The data set, which is stored in Data_JAustralian.mat, contains the log quarterly Australian Consumer Price Index (CPI) measured from 1972 and 1991, among other time series.

Prepare Data for Econometric Modeler

At the command line, load the Data_JAustralian.mat data set.

load Data_JAustralian

Import Data into Econometric Modeler

At the command line, open the Econometric Modeler app.

econometricModeler

Alternatively, open the app from the apps gallery (see Econometric Modeler).

Import DataTimeTable into the app:

  1. On the Modeler tab, in the Import section, click the Import button .

  2. In the Import Data dialog box, select the check box for the DataTimeTable variable.

  3. Click Import.

The variables, including PAU, appear in the Time Series pane, and a time series plot of all the series appears in the Plot(EXCH) figure window.

Create a time series plot of PAU by double-clicking PAU in the Time Series pane.

This time series plot shows the upward trending path of the variable PAU from 1972 through the 1990's.

The series appears nonstationary because it has a clear upward trend.

Plot Sample ACF and PACF of Series

Plot the sample autocorrelation function (ACF) and partial autocorrelation function (PACF).

  1. In the Time Series pane, select the PAU time series.

  2. Click the Plots tab, then click ACF.

  3. Click the Plots tab, then click PACF.

  4. Close all figure windows except for the correlograms. Then, drag the ACF(PAU) figure window above the PACF(PAU) figure window.

This set of time series plots compare the differences between the Sample Autocorrelation Function of the variable PAU in the ACF tab and the Sample Partial Autocorrelation Function of the variable PAU in the PACF tab. Lag is shown on the x axis and blue horizontal lines indicate Confidence Bounds.

The significant, linearly decaying sample ACF indicates a nonstationary process.

Close the ACF(PAU) and PACF(PAU) figure windows.

Difference the Series

Take a first difference of the data. With PAU selected in the Time Series pane, on the Modeler tab, in the Transforms section, click Difference.

The transformed variable PAU_Diff appears in the Time Series pane, and its time series plot appears in the Plot(PAU_Diff) figure window.

This time series plot shows the path of the variable PAU_Diff from 1972 through the 1990's.

Differencing removes the linear trend. The differenced series appears more stationary.

Plot Sample ACF and PACF of Differenced Series

Plot the sample ACF and PACF of PAU_Diff. With PAU_Diff selected in the Time Series pane:

  1. Click the Plots tab, then click ACF.

  2. Click the Plots tab, then click PACF.

  3. Close the Plot(PAU_Diff) figure window. Then, drag the ACF(PAU_Diff) figure window above the PACF(PAU_Diff) figure window.

This set of time series plots compare the differences between the Sample Autocorrelation Function of the variable PAU_Diff in the ACF tab and the Sample Partial Autocorrelation Function of the variable PAU_Diff in the PACF tab. Lag is shown on the x axis and blue horizontal lines indicate Confidence Bounds.

The sample ACF of the differenced series decays more quickly. The sample PACF cuts off after lag 2. This behavior is consistent with a second-degree autoregressive (AR(2)) model for the differenced series.

Close the ACF(PAU_Diff) and PACF(PAU_Diff) figure windows.

Specify and Estimate ARIMA Model

Estimate an ARIMA(2,1,0) model for the log quarterly Australian CPI. This model has one degree of nonseasonal differencing and two AR lags.

  1. In the Time Series pane, select the PAU time series.

  2. On the Modeler tab, in the Models section, click ARIMA.

  3. In the ARIMA Model Parameters dialog box, on the Lag Order tab:

    1. Set Degree of Integration to 1.

    2. Set Autoregressive Order to 2.

    The ARIMA Model Parameters dialog box Lag Order tab shows Autoregressive Order set to 2, degree of integration set at 1, moving average order set to zero and the box next-to "Include Constant Term" is selected. The model equation section is at the bottom of the dialog box, and the buttons for Details, Estimate, and Cancel are below the equation.

  4. Click Estimate.

The model variable ARIMA_PAU appears in the Models pane, its value appears in the Preview pane, and its estimation summary appears in the Fit(ARIMA_PAU) document.

This screen shot shows time series plots of Model Fit for PAU and ARIMA_PAU and Residual Plot for ARIMA_PAU. To the right are two tables, one for Parameters on top and one for Goodness of Fit below.

Both AR coefficients are significant at a 5% significance level.

Check Goodness of Fit

In the Fit(ARIMA_PAU) document, inspect the fit results to assess the goodness-of-fit.

  • In the Model Fit figure, the time series plot of the data and fitted values shows a good in-sample fit.

  • In the Residual Plot figure, the residual series is centered at zero, but shows possible volatility clustering (higher variance at earlier residuals than those later in the series) or that the innovations distribution is heavy tailed.

  • In the Goodness of Fit table, the Durbin-Watson statistic in the is close to 2, which suggests little residual autocorrelation.

Check that the residuals are normally distributed and uncorrelated by plotting a histogram, quantile-quantile plot, and ACF of the residuals.

  1. Close the Fit(ARIMA_PAU) document.

  2. With ARIMA_PAU selected in the Models pane, on the Modeler tab, in the Diagnostics section, click Model Fit Diagnostics > Residual Histogram.

  3. Click Model Fit Diagnostics > Residual Q-Q Plot.

  4. Click Model Fit Diagnostics > Residual Autocorrelation.

  5. In the right pane, drag the Hist(ARIMA_PAU) and QQ(ARIMA_PAU) figure windows so that they occupy the upper two quadrants, and drag the ACF so that it occupies the lower two quadrants.

At the top left this screen shot shows the tab Hist for the variable (ARIMA_PAU) with a Residual Histogram of ARIMA_PAU. At the top right this screen shot shows the tab QQ for the variable (ARIMA_PAU) with a Residual Quantile-Quantile Plot of ARIMA_PAU. Across the bottom this screen shot shows the tab ACF for the variable (ARIMA_PAU) with a time series plot of the residual sample autocorrelation function of ARIMA_PAU.

The residual plots suggest that the residuals are approximately normally distributed and uncorrelated. However, there is some indication of an excess of large residuals. This behavior suggests that a t innovation distribution might be appropriate.

Generate MMSE Forecasts

Generate MMSE forecasts and approximate 95% forecast intervals from the estimated ARIMA(2,1,0) model for the next four years (16 quarters).

  1. In the Models pane, select the ARIMA_PAU model.

  2. On the Modeler tab, in the Forecast section, click Forecast.

  3. In the Forecast Model Response dialog, set Number of periods in forecast horizon to 16.

  4. Click Forecast.

  5. In the right pane, close all figure subsections so that the plot in the For(ARIMA_PAU) tab displays.

This time series plot shows Log Australian CPI Forecast, with the paths for Log CPI, Forecast, and forecast Interval shown.

References

[1] Box, George E. P., Gwilym M. Jenkins, and Gregory C. Reinsel. Time Series Analysis: Forecasting and Control. 3rd ed. Englewood Cliffs, NJ: Prentice Hall, 1994.

See Also

Apps

Objects

Functions

Topics