When we use SPSS for data analysis, we sometimes need to use SPSS for time series analysis, so what should we pay attention to in time series analysis and how to operate it?
Operation method
First, we import a group of test data from Excel into SPSS for time series analysis. In the dialog box as shown in the figure, select the excel file shown in the figure under "Open existing data source".
Then in the pop-up "Open Excel Data Source" box, under "Worksheet", select the Excel sheet where you enter data, and click "OK".
Next, we need to check the imported data, such as whether there is missing data and how the data is distributed. Method 1: click "Data View" at the bottom left corner to view the original data (when there is not much data used); Method 2: click "Analysis - Description Statistics - Description" to view the data (recommended in case of more data).
Data preprocessing
After completing the above steps, you need to preprocess the data before performing time series analysis, that is, define the date for the data.
First, click "Data - Define Date" on the menu as shown in the figure.
Next, we set the format of the date in the pop-up Define Date dialog box. In the illustrated case, we now use "year, month" as the date format.
After determining the date format, we can see the newly inserted date "Year", "Month" and "Date" (the default name of the new variable) in the "Data View" of the SPSS data table.
Time series analysis - exponential smoothing method
First, we use exponential smoothing method to analyze time series. The use of exponential smoothing is characterized by putting larger weights on the latest data.
We click "Analysis - Forecast - Create Model" in the first row of menu bar in order to pop up the "Time Series Modeler".
Now make some settings: under the "Variable" option, drag the variable to be predicted for the time series into the "Dependent Variable" box shown in the figure; In Method, select Exponential Smoothing.
Other settings include [Statistics]. We check "Stable R Square", "Goodness of Fit" and "Display Predicted Value"; Select "Observed Value", "Predicted Value" and "Fitted Value" in [Chart]; Check Predicted Value in Save; Under [Option], fill in the specified date that we need to predict.
After all settings are completed, click OK to see the results displayed by the time series modeling program in the output document (right click the result chart to copy, export to Excel, etc.).
Time series analysis - ARIMA model
We can also use ARIMA model to predict time series, which is characterized by transforming non-stationary time series into stationary time series, and then regressing the dependent variable only to its lag value and the present value and lag value of random error term. ARIMA (p, d, q) in ARIMA model is called differential autoregressive moving average model, AR is autoregressive, and p is autoregressive term; MA is the moving average, q is the number of moving average terms, and d is the number of differences made when the time series becomes stable.
The method used is similar to that above. Click "Analyze Forecast Create Model" in the first menu bar to pop up the "Time Series Modeler".
Since we have made settings in the exponential smoothing method, there is no need to set again. The setting required here is to drag the independent variable under Variable into the Dependent Variable box and the Independent Variable box, and then select "ARIMA" in the method.
After all settings are completed, click OK to see the prediction results using ARIMA model in the output document just now (similarly, these results can be copied and exported by right clicking).