STATA Tutorial

cointegration and error correction model in Stata

cointegration in stata
Play Video

share content

buy the material

short run model: error correction model

We have estimated the long run model. Now it’s time to estimate the short run model.  For the short run model, the variables need to be in differences – stationary form, and we need to incorporate to the model the error correction term. The error correction terms are the residuals of the long run regression but lagged one period.

error correction term - residuals lagged one period
\epsilon_{t-1}=X_t - \beta_0 - \beta_1 M_{t-1}~~~(1)
variables in their stationary form (in 1st differences)
 \triangle X_t=\beta_0+\beta_1 \triangle M_t + \beta_2\epsilon_{t-1}+\nu_t~~~(2) \\
Plug equation (1) in (2) and you obtain to the short run model
\triangle X_t=\beta_0+\beta_1 \triangle M_t + \beta_2(X_t - \beta_0 - \beta_1 M_{t-1})+\nu_t~~~(3)\\

cointegration: error correction term interpretation

 \triangle X_t=\beta_0+\beta_1 \triangle M_t + \beta_2\epsilon_{t-1}+\nu_t~~~(2) \\
  1.  \beta_2 is the error correction term estimated coefficient, where -1<\beta_2<0
  2. Values out of the range are explosive results. You need to review/re-estimate your model.
  3. The coefficient determines the “speed of adjustment” towards the long run equilibrium.
  4. The deviations from the long-run equilibrium are corrected gradually by the error correction term through a series of partial short-run adjustments.
  5. If the Error correction term is close to 1, it means that almost 100% of the deviations are corrected withing a period (period depends on the frequency of your data: daility, monthly, quarterly, etc).
  6. If the error term is close to 0, the model is very slow to return to an equilibrium after a shock.

short run and long run estimated model

long run model
X_t= -0.43 + 1.02 M_t + \epsilon_t
short run model
X_t= 0.009 + 0.64 M_t -0.11\epsilon_{t-1} + \nu_t

interpretation of the model

  1.  A 1% increase in imports, results in a 1.02% increase in exports. The results are appropriate since in the long run, export grow more than imports.
  2. The short run model is telling us that 11% of the deviations from the long run equilibrium are corrected within a period (In our example, a period is a quarter since we are working with quarterly data).
  3.  The speed of adjustment in our model is slow. It would take around 9 periods to achieve equilibrium.

Final step: model diagnostics

residuals normality test
  •  Jarque-Bera Statistic for testing normality
  • H0= Residuals are Normally distributed
  • If p>0.05, residuals are normally distributed
serial correlation
  • As we have lagged variables, DW statistics is no longer valid.
  •  You can check for the correlogram – Q statistic
  • H0= No serial Correlation
  • or, Serial Correlation LM test – Breusch-Godfrey test
  • H0= No Serial Correlation

recommended literature

Download the dataset for free and replicate the content covered in the video

Download the Data Set for Free (direct download, no adds).

$4.99 CAD

PRemium Content

book a meeting

Do you need help with your research plan?

Are you stuck and need help to design/plan your thesis topic and methodology?

buy the material

Elevate your learning experience. You can buy the package for each of the tutorials.  Each package contains the slides of the video + Workfile/Do File + Data & Support

share content