How to test and diagnose VECM in STATA?

The previous article estimated Vector Error Correction (VECM) for time series Gross Domestic Product (GDP), Gross Fixed Capital Formation (GFC)Private Final Consumption (PFC ). This article explains testing and diagnosing VECM in STATA to ascertain whether this model is correct or not. Among diagnostic tests, common ones are tested for autocorrelation and test for normality.

LM test for residual autocorrelation and diagnosing VECM

To start with the test for autocorrelation, follow these steps:

  1. Click on ‘Statistics’ on the main tab.
  2. Select ‘Multivariate Time Series’.
  3. Select ‘VEC diagnostics and test’.
  4. Click on ‘LM test for residual autocorrelation’.

The below figure will appear.

Figure 1: Pathway for testing and diagnosing VECM in STATA

Figure 1: Pathway for testing and diagnosing VECM in STATA

‘Veclmar’ window will appear as shown in the figure below. Select the maximum order of autocorrelation and specify vec model, for instance, 2. It is important to perform LM diagnostic test after VECM such to use active vec model.

Figure 2: LM test for residual autocorrelation window for testing diagnosing VECM in STATA

Figure 2: LM test for residual autocorrelation window for testing and diagnosing VECM in STATA

The result for auto-correlation will appear as shown in the figure below. The command for autocorrelation after VECM also appears in the result window. Alternatively, use the below command to derive results:

veclmar
Figure 3: LM test for residual autocorrelation results for diagnosing and testing VECM in STATA

Figure 3: LM test for residual autocorrelation results for testing and diagnosing VECM in STATA

The null hypothesis states that no autocorrelation is present at lag order. Although at lag 1, p values are significant, indicating the presence of autocorrelation, at lag 2, the p values are again insignificant. Therefore accept the null hypothesis. Hence it means at lag 2, VECM model is free of the problem of autocorrelation.

Normality test for VECM

Perform the normality test for  VECM using Jarque-Bera test following the below steps :

  • Click on ‘Statistics’ on the main bar.
  • Select ‘Multivariate Time Series’.
  • Select ‘VEC diagnostics and test’.
  • Click on ‘Test for normally distributed disturbance’.
Figure 4: Pathway for normality test for VECM in STATA

Figure 4: Pathway for normality test for VECM in STATA

‘vecnorm’ window will appear as shown in the figure below.  Only choose ‘Jarque–Bera test’ and click on ‘OK’.

Figure 5: 'vecnorm' indow for normality of VECM in STATA

Figure 5: ‘vecnorm’ window for normality of VECM in STATA

The result for normality will appear. The command for normality after VECM appears in the result window. Alternatively, use the below command to derive results:

vecnorm, jbera
Figure 6: Normality results for VECM in STATA

Figure 6: Normality results for VECM in STATA

The null hypothesis states that the residuals of variables are normally distributed. Apart from GFC, p values all other variables are significant, indicating the null hypothesis is rejected. Therefore residuals of these variables are not normally distributed. Therefore, this VECM model carries the problem of normality.

Forecasting using VECM in STATA

Further, to forecast the values of GDP, GFC and PFC using VECM results, follow these steps as shown in the figure below:

  • Click on ‘Statistics’ on the main bar.
  • Select ‘Multivariate Time Series’.
  • Select ‘Dynamic Forecasts’.
  • Click on ‘Compute Forecasts’.
Figure 7: Pathway for generating forecasts using VECM in STATA

Figure 7: Pathway for generating forecasts using VECM in STATA

‘fcast’ window will appear (figure below). Choose a prefix (in this case, “bcd”). Then select the period to be forecast. In this case, the values of the time series till four quarters, therefore select ‘4’.

Figure 8: Window for forecasting using VECM in STATA

Figure 8: Window for forecasting using VECM in STATA

The window does not reveal the results of the forecast. Rather, they appear in data editor window as newly created variables. The table below shows the forecast for the case.

Forecasts for GDP, GFC and PFC

bcdgdp
bcdgdp_SE
bcdgdp_LB
bcdgdp_UB
39167.623 201.22073 38773.238 39562.009
39974.993 336.61638 39315.237 40634.749
40698.917 420.85106 39874.064 41523.77
41558.835 481.19283 40615.715 42501.956
bcdgfc
bcdgfc_SE
bcdgfc_LB
bcdgfc_UB
10522.74 184.93499 10160.274 10885.206
10587.456 249.05729 10099.313 11075.599
10291.868 303.42519 9697.1655 10886.57
10896.363 342.23838 10225.588 11567.138
bcdpfc
bcdpfc_SE
bcdpfc_LB
bcdpfc_UB
22982.765 187.45083 22615.368 23350.162
22858.882 216.86206 22433.84 23283.924
23486.921 241.51248 23013.565 23960.277
24138.938 261.08742 23627.216 24650.66

Table 1: Forecasts for GDP, GFC and PFC

Therefore the analysis of Vector Auto Correlation (VAR) and VECM assumes a short run or long run causality among the variables. The next article will extend this analysis by incorporating the effects of volatility in time series. More specifically, it will focus upon the Autoregressive Conditionally Heteroskedastic (ARCH) Model.

Divya Dhuria

Research analyst at Project Guru
DIvya has a keen interest in policy making and wealth management. She is a Master in Economics from Gokhale Institute of Politics and Economics. She has been trained in the econometric techniques to assess different possible economic relationships. She hascontributed to the working paper on National Rural Health Mission at Institute of economic growth, Delhi. Along with academical growth, she likes to explore and visit different places in her spare time.
Divya Dhuria

Related articles

  • Lag selection and cointegration test in VAR with two variables The previous article showed that the three-time series values Gross Domestic Product (GDP), Gross Fixed Capital Formation (GFC) and Private Final Consumption (PFC) are non-stationary. Therefore they may have long-term causality. The general assumption, in this case, is that consumption […]
  • How to perform Johansen cointegration test in VAR with three variables? The previous article showed lag selection and stationarity for Vector Auto Regression (VAR) with three variables; Gross Domestic Product (GDP), Gross Fixed Capital Formation (GFC) and Private Final Consumption (PFC). This article shows the co-integration test for VAR with three variables.
  • VECM in STATA for two cointegrating equations Unrestricted Vector Auto Regression (VAR) is not applicable in such cases. Vector Error Correction Model (VECM) is a special case of VAR which takes into account the cointegrating relations among the variables.
  • 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. […]
  • How to perform regression analysis using VAR in STATA? In multivariate time series, the prominent method of regression analysis is Vector Auto-Regression (VAR). It is important to understand VAR for more clarity.
Discussions

1 Comments.

  1. Dear Divya,
    Thank you very much for your posts which are extremely helpful. I am at the first stages of learning econometric. I am sorry to ask this simple question, would you please explain the steps on how to correct the problem of normality on vecm?
    I was running my time-series data with multi-variate vecm approach. When performing normality test on vecm, I got similar problem. I also used GCF as one of my variables and the normality test showed me that only GCF’s not normally distributed, other variables are normally distributed.
    Thank you.

    Kind regards,
    Lisa

Discuss

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