2
$\begingroup$

Estimating a Vector Error Correction Model (VECM) in R can be done by using the command cajorls. The R output consists of the coefficients of the Error Correction Terms and the values of the coefficients on the lagged variables used in the VECM, together with the "Betas". When using two variables, we are getting a bivariate model.

My questions:

  1. Although all the coefficients necessary to build the VECM are getting calculated by R, there are no standard errors or respective p-values reported in the R output. In R, is there a command that lets you compute the standard errors of the coefficients on the error correction terms (ECT)?

  2. Is it correct that the coefficients on the ECT describe the long-run relationship between the two variables in a mathematical way (the sign tells you what variables is "dominant")?

$\endgroup$
0

2 Answers 2

1
$\begingroup$

Although all the coefficients necessary to build the VECM are getting calculated by R, there are no standard errors or respective p-values reported in the R output. In R, is there a command that lets you compute the standard errors of the coefficients on the error correction terms (ECT)?

An indirect way would be to manually specify the particular equation (having defined the appropriate lags of variables and the error correction term first) and estimate it with the lm function.

Is it correct that the coefficients on the ECT describe the long-run relationship between the two variables in a mathematical way (the sign tells you what variables is "dominant")?

The coefficient on the ECT in an equation of the VECM quantifies the impact of the error correction term on the particular dependent variable (just as any regression coefficient in a linear model). The sign shows whether there is "error correction" (so that the variable corrects towards eqquilibrium) or "error inflation" (just made this term up; so that the variable deviates further from the equilibrium). I am not sure if the latter makes sense, but empirically the coefficients might occasionally have funny signs like that.

If some of the variables have coefficients that are indistinguishable from zero, then those are "dominant" in the sense that they do not adjust towards the equilibrium; rather, they "drive" the system of variables. But there must be some other variables in the system that do adjust, and these ones are "dominated". (If none of the variables adjusted towards the equilibrium, there would be no cointegration.)

On the other hand, the coefficients on the variables inside the error correction term describe the long-run equilibrium relationship.

$\endgroup$
3
  • $\begingroup$ One quick follow-up question: How would it work with lm? Would you - instead of cajorls use lm and use standard OLS; that is regressing Y on X and lagged values of X and Y? $\endgroup$
    – Kuma
    Commented Jun 12, 2017 at 19:50
  • $\begingroup$ @Kuma, cajorls does use lm or something like it. The "ls" part of the funciton name cajorls tells you that least squares are employed. If "r" stands for restricted and it matters (I would have to investigate the function further, but you can probably find that yourself in the help files or in some vignette), then find a function that does restricted least squares instead of lm. I do not see why there should be restrictions in a basic VECM, though; but in some restricted versions (restricted VECM) you would naturally have to use restricted least squares in place of OLS. $\endgroup$ Commented Jun 12, 2017 at 19:55
  • $\begingroup$ Okay then, I'll try to solve it manually by using either lm or some other command, I'll search for it . Thanks for your answer! $\endgroup$
    – Kuma
    Commented Jun 12, 2017 at 20:09
4
$\begingroup$

You can use package tsDyn for this, function VECM, and summary() on that output:

library(tsDyn)
library(vars)
data(Canada)
beta_tsDyn <- VECM(Canada, lag = 1, estim = "ML")

## sd in parenthesis:
summary(beta_tsDyn)
#> #############
#> ###Model VECM 
#> #############
#> Full sample size: 84     End sample size: 82
#> Number of variables: 4   Number of estimated slope parameters 24
#> AIC -496.5914    BIC -431.6099   SSR 98.31618
#> Cointegrating vector (estimated by ML):
#>    e     prod         rw       U
#> r1 1 0.150283 -0.2465121 3.61281
#> 
#> 
#>               ECT                Intercept             e -1               
#> Equation e    0.0132(0.0164)     -12.2255(15.3094)     0.7656(0.1466)***  
#> Equation prod 0.0666(0.0276)*    -61.9059(25.7226)*    -0.2986(0.2464)    
#> Equation rw   -0.1817(0.0335)*** 170.2479(31.2632)***  -0.1962(0.2994)    
#> Equation U    -0.0438(0.0123)*** 41.0526(11.4980)***   -0.5846(0.1101)*** 
#>               prod -1             rw -1               U -1               
#> Equation e    0.1651(0.0663)*     -0.0236(0.0581)     0.1421(0.2009)     
#> Equation prod 0.1479(0.1114)      0.1232(0.0977)      -0.8435(0.3376)*   
#> Equation rw   -0.0437(0.1354)     -0.0570(0.1187)     0.4351(0.4103)     
#> Equation U    -0.0731(0.0498)     -0.0291(0.0437)     -0.1331(0.1509)


## get matrix of ECT and their sd:
coefs_all <- summary(beta_tsDyn)$coefMat
coefs_all[grep("ECT", rownames(coefs_all)),]
#>             Estimate Std. Error    t value     Pr(>|t|)
#> e:ECT     0.01324009 0.01640290  0.8071796 4.220820e-01
#> prod:ECT  0.06664213 0.02755983  2.4180891 1.799714e-02
#> rw:ECT   -0.18171584 0.03349618 -5.4249718 6.638121e-07
#> U:ECT    -0.04383977 0.01231927 -3.5586331 6.464448e-04

## just fo rthe sake of making sure, do we get same cointegrating vector as in urca?
beta_vars <- cajorls(ca.jo(Canada))$beta
all.equal(beta_vars, 
          coefB(beta_tsDyn), check.attributes = FALSE)
#> [1] TRUE
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.