2.2.5.1.1 Tutorial for ARIMA ToolTSA-ARIMA-Tutorial
Summary
In this sample, we will use ARIMA tool in Time Series Analysis app to fit catfish sales data with a specified model and forecast sales of next year.
Tutorial
This tutorial uses App’s built-in sample project. To open this sample OPJU file:
- Right click the Time Series Analysis App icon in the Apps Gallery and choose Show Samples Folder.
- A folder will open. Drag-and-drop the project file TSA Sample.opju into Origin.
Stationary Test
Before use ARIMA tool to analysis and forecast time series data, you need to do the Stationary Test to confirm the dataset is stationary. Usually, the dataset with trends or seasonality, that is a non-stationary time series.
If the dataset is not stationary, you can use Differences tool to transform it to stationary. And the order of differencing is the Difference parameter for ARIMA model.
Get the parameters
For the stationary time series data, according the ACF and PACF plot from Autocorrelation and Partial Autocorrelation tool, we can get the Autoregressive and Moving Average parameters.
ARIMA
- Activate the workbook "Catfish Sales". Click the Time Series Analysis App icon in the Apps Gallery.
- In the Time Series Analysis window, select ARIMA tab and then click ARIMA button. A dialog will open.
- Input data is a part of catfish sales data. We choose data from 1/1/1996 to 1/1/2008. And the sampling interval is a month. There are total 145 rows.
-
In Model tab, set 1 to Autoregressive, 1 to Difference, 1 to Moving Average. Check Fit Seasonal Model, in Seasonal group, set 12 to Period, 1 to Autoregressive, 1 to Difference, 0 to Moving Average. Check Include Constant Term. In Quantities tab, set 12 to Number of Forecasts in Forecasts group. In Graph tab, check all options. Click Preview button.
- Click OK button to perfrom the analysis. You will get the results below:
-
In ARIMA report, Fit Statistics table shows the residual sum of squares: 1.39781e8.
In Parameters table, it lists parameter values in ARIMA fit and standard errors. And its P-value shows whether it is significantly different from zero. e.g. MA1 (moving average 1, i.e. )= 0.71583, its P-value=1.29e-11<0.05, so it is significantly different from zero.
-
In Time Series Plot , it shows forecasts and its confidence bands. To verify the result, we can add points for actual data from 2/1/2008 to 1/1/2009 to compare (shown as blue cross mark).
-
Autocorrelation Function Plot for residuals and Partial Autocorrelation Function Plot for residuals can be used to determine whether residuals are correlated, i.e. residuals are independent. Two plots show the maximum absolute value is about 0.3, and we can conclude residusla are independent.
|