Prediction and forecasting using ARIMA in STATA

After performing Autoregressive Integrated Moving Average (ARIMA) modelling in the previous article: ARIMA modeling for time series analysis in STATA, the time series GDP can be modelled through ARIMA (9, 2, 1) equation as below:

Figure 1: ARIMA Results in STATA

Figure 1: ARIMA Results in STATA

ARIMA results as in the above figure can be analysed through several components:

  1. Log likelihood: the value of log likelihood is 535.8 which is minimum among all the ARIMA models.
  2. AIC & BIC: The value of AIC and BIC is also less than previous model but only up to 1 point.

Prediction in ARIMA

To generate the prediction use the command:

STATA Command: predict chat, y

The commands ‘predict’ is used for generating values based on selected model. In present case this is fixed effect model. Furthermore, ‘chat’ is the term given to the fitted variable of GDP. Lastly, ‘y’ denotes the fitted values. Now a separate variable as ‘chat’ will be created in data editor window. This is the fitted values of GDP. The command for standard errors is:

STATA Command: predict stdp

Furthermore, represent the fitted and actual values together in two way graph. It shows standard deviations as scattered around the fitted line. For that use the command:

STATA Command: twoway lfitci  gdp chat, stdp || scatter  gdp chat

Here,

  • ‘twoway’ is for two way graphs in STATA
  • ‘lfitci’ stands for line of best fit with confidence interval
  • ‘gdp’ is actual variable
  • ‘chat’ is predicted variable
  • ‘Stdp’ is estimated standard error
  • ‘Scatter’ means scatter plot.

After running the command, the below graph will appear. It shows green dots as actual GDP values, shaded region as confidence interval and straight line as fitted values.

Figure 2: Two way graph of actual and fitted values of GDP

Figure 2: Two way graph of actual and fitted values of GDP

The above graph shows that the fitted values fully take into account the scattered values of GDP. That means although the mean of both the series are same, ‘predict’ values of GDP do not differ from actual values of GDP.

Forecasting

To generate the prediction use the command:

STATA Command: predict chatdy, dynamic(tq(2017q1)) y

Here,

The command ‘predict’ is used for generating values based on selected model. In the present case is fixed effect model.  Furthermore,‘chatdy’ is the name for the forecasted variable of GDP. Lastly, ‘dynamic’ denotes the dynamic forecasting of STATA.

Now, a separate variable as chat will appear in data editor window. This shows the forecasted values of GDP. The forecasted values of GDP for 2017 are:

Time Period GDP Forecasts
2017 Q1 39333.45
2017 Q2 40220.4
2017 Q3 41081.47
2017 Q4 42014.04

Thus, ARIMA equations are useful in forecasting the values of GDP. However, ARIMA is insufficient is defining the econometrics model with more than one variable. Therefore, multi-variate time series is necessary in some cases. The proceeding articles explain the procedure for conducting Vector Auto-Regression (VAR) analysis, which is a popular method of multi-variate time series.

Priya Chetty

Partner at Project Guru
Priya Chetty writes frequently about advertising, media, marketing and finance. In addition to posting daily to Project Guru Knowledge Tank, she is currently in the editorial board of Research & Analysis wing of Project Guru. She emphasizes more on refined content for Project Guru's various paid services. She has also reviewed about various insights of the social insider by writing articles about what social media means for the media and marketing industries. She has also worked in outdoor media agencies like MPG and hotel marketing companies like CarePlus.

Latest posts by Priya Chetty (see all)

Related articles

  • ARIMA modeling for time series analysis in STATA In the previous article, all possibilities for performing Autoregressive Integrated Moving Average (ARIMA) modeling for the time series GDP were identified as under. S. […]
  • Building univariate ARIMA model for time series analysis in STATA Autoregressive Integrated Moving Average (ARIMA) is popularly known as Box-Jenkins method. The emphasis of this method is on analyzing the probabilistic or stochastic properties of a single time series. Unlike regression models where Y is explained by X1 X2….XN regressor (like […]
  • Solution for non-stationarity in time series analysis in STATA The previous article based on the Dickey Fuller test established that GDP time series data is non-stationary. This prevented time series analysis from proceeding further. Therefore, in this article possible solution to non-stationarity is explained.
  • Problem of non-stationarity in time series analysis in STATA The purpose of this article is to explain the process of determining and creating stationarity in time series analysis. Creating a visual plot of data is the first step in time series analysis. Graphical representation of data helps understand it better.
  • Importing data to STATA STATA comes with a set of sample data files. This helps the learner in understanding how different set of tests can be applied to single data.

Discuss

We are looking for candidates who have completed their master's degree or Ph.D. Click here to know more about our vacancies.