# Extracting long run coefficient in vector error correction model in R

I used the urca package in R to estimate an error correction model. I used the ca.jo and cajorls functions for estimation. The results report the coefficients of the model showing bellow:

Call:
lm(formula = substitute(form1), data = data.mat)

Residuals:
Min       1Q   Median       3Q      Max
-0.24141 -0.07255  0.01178  0.08593  0.23220

Coefficients:
Estimate Std. Error t value Pr(>|t|)
ect1      -0.28598    0.04589  -6.232 2.91e-08 ***
dem.dl1    0.46455    0.08292   5.603 3.76e-07 ***
compp.dl1 -0.45926    0.19675  -2.334   0.0224 *
gdp.dl1   -4.30191    4.82234  -0.892   0.3754
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.1202 on 71 degrees of freedom
Multiple R-squared:  0.5842,    Adjusted R-squared:  0.5608
F-statistic: 24.94 on 4 and 71 DF,  p-value: 6.43e-13


I understand the coefficient associated with the ect1 is the adjustment coefficient to the long-run equilibrium. However, I have two questions about this estimations.

1. Is there a way to recover the coefficient "inside" the ect1 term, the long-run equilibrium coefficient? Or do I have to estimate it using OLS?
2. Is there a way to calculate the derivative of the dependent variable (dem) with respect to the variable compp? Or is it just the coefficient for compp.dl1?

## 1 Answer

Regarding question 1, let the output of ca.jo be x, then you can get the cointegration vectors as x@V. This will contain the coefficients "inside" the ect1 term.

Regarding question 2, the coefficient on compp.dl1 will the be effect of lagged (rather than contemporaneous) compp on dem. Keep in mind that compp might be affected by dem at the same time as it is affecting dem (that is, compp might be endogenous w.r.t. dem), although it need not necessarily be the case.

See the vignette of package "vars" and/or Pfaff "Analysis of Integrated and Cointegrated Time Series with R" for more details.

• Thanks very much for your answer Richard! It's very helpful. – user134355 Oct 13 '16 at 13:07
• Regarding the second question, is there a way to derive the marginal effect of contemporaneous terms from the VECM? I know according to the functional form, it seems impossible as all terms are lagged. Or the contemporaneous marginal effect is simply the long-run coefficient? Thanks – user134355 Oct 13 '16 at 13:09
• I don't quite know how to do that. It is difficult to define the marginal effect if it is going both ways due to endogeneity. And no, this should not be the same as the long-run coefficient (however you define that). – Richard Hardy Oct 13 '16 at 16:37
• Hi Richard. I used the code vecm@V to extract the results. It turns out to be the normalised eigen vectors. Do you know how I can interpret them? I googled it, but it seems there is no good answers out there. Thanks! – user134355 Oct 13 '16 at 19:55
• These show the loadings with which the combination of the cointegrated time series is stationary. This combination is the error correction term in the VEC model. – Richard Hardy Oct 13 '16 at 19:59