# VECM in STATA for two cointegrating equations

In the previous article, Johansen cointegration test revealed the cointegration between time series **Gross Domestic Product (GDP)**, Private Final Consumption (PFC) and * Gross Fixed Capital Formation (GFC)*, containing up to two cointegrating equations. Therefore, 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.

## Vector Error Correction Model (**VECM**) in STATA

To start with ** VECM**, follow these steps:

- Click on ‘Statistics’ in the main tab
- Select ‘Multivariate Time Series’
- Select ‘Vector Error-Correction Model’

The ‘vec’ dialogue box will appear as shown in the figure below. Fill three options; ‘Dependent variables’, ‘Number of co-integrating equations’ and ‘Maximum lag’.

In ‘Dependent variables’ select ‘gdp’, ‘gfc’ and ‘pfc’, using the drop-down menu. In ‘Number of co-integrating equations (rank)’, select ‘2’, since the previous article showed two cointegrating equations using the Johansen cointegration test. Finally in ‘Maximum lag to be included’, select ‘8’, as the previous article showed 8 lags. Click on ‘OK’.

The results will appear as shown in the figure below. Since this case has 8 lags and two equations, the results are lengthy. For more clarity, the explanation is broken down into parts.

## Part I of results of **VECM** in STATA

This contains the STATA command showing in the result window with information about all the variables as shown in the figure below. For instance, ** VECM** has taken the first difference of these variables, such that they are represented as D_gdp, D_gfc, and D_pfc. Further, the R-square value of all three variables are good enough to justify their causality, and p values close to zero also indicates significance.

## Part II of **VECM** in STATA

This part of the result shows the regression equations by taking ‘D_gdp’ as dependent and lagged values of ** GFC** and

__PFC__as independent variables as shown in the figure below. The interpretation is as follows:

- ‘ce1’ and ‘ce2’ represent two cointegrating equations. To ascertain the long-term causality between
**GDP**and__PFC__and, the ‘ce1’ and ‘ce2’ have to show a negative coefficient and a significant p-value. As the figure below shows, both the equations do not have negative coefficient but ‘ce2’ has a significant p-value of 0.011. Since all two conditions are missing here, this*GFC*do not show any long-term causality between__VECM__**GDP**and the other two variables__PFC__and.*GFC* - Furthermore, to examine the short-term causality between variables, see individual lag coefficients and p values for each independent variable (figure below). Thus this part explains the lagged values of
and*GFC*__PFC__for**GDP**. As per the result, the only 1^{st}lag ofis significant (p-value is 0.00), apart from that no other lag, even of*GFC*__PFC__have no significance level. That means the only first lag ofhas a short-term causality with*GFC***GDP**.

## Part III of **VECM** in STATA

Similarly, the results of ** VECM** go forward by assuming each of remaining variable as dependent and other as the independent. For instance, ‘D_gfc’ is dependent and ‘D_pfc’ is independent (figures below).

- In the case of
, a long-term causality from*GFC***GDP**and__PFC__tois noticeable because ‘ce2’ equation, in this case, has both negative coefficient and significant p-value.*GFC* - A short-term causality is evident only in case of
__PFC__that too on seventh lag with significant p values 0.000. - In case of
__PFC__, a long-term causality fromand*GFC***GDP**to__PFC__is absent as both ‘ce1’ and ‘ce2’ equations, in this case, have both non-negative coefficient and insignificant p-value. - In the case of
__PFC__, a short-term causality is evident in case of 1^{st}lag ofand*GFC***GDP**with significant p values 0.000.

**5E3BCCB908B47**to save

**6000**on

**6001 - 10000 words**standard order of

**research analysis**service.

^{}To ensure whether the ** VECM** is correctly specified or not, a set of diagnostics tests such as tests for normality, serial correlation and heteroskedasticity need to be performed. The next article will show how to conduct these diagnostics tests in STATA.

- How to identify ARCH effect for time series analysis in STATA? - October 4, 2018
- How to test and diagnose VECM in STATA? - October 4, 2018
- VECM in STATA for two cointegrating equations - September 27, 2018

## Discuss