causality test of Granger cajorls R

Asked

Viewed 176 times

0

I would like to do the Granger causality test on vec in data R:

library(urca)

data(finland)
sjf <- finland
sjf.vecm <- ca.jo(sjf, ecdet = "none", type = "eigen", K = 2,
spec = "longrun", season = 4)
sjf.vecm.rls <- cajorls(sjf.vecm, r = 2)
  • I don’t see much connection between Granger’s causality test and the question code (which is just the example on the page help('cajorls')). The package urca nor has a function for this test. It can explain better what you want?

  • In fact, I would like to do the Granger causality test on the error correction term, (in the ECT case), to analyze long-term causality. I also searched for the VECM function of the tsDyn package and couldn’t find anything. I don’t know if I could explain well what I would like

  • The package lmtest has a function grangertest. Example: lmtest::grangertest(lrm1.dl1 ~ ect1, data = sjf.vecm.rls$rlm$model). But there are other packages, to find them try to install the package sos and run sos::findFn('granger causality test').

  • Excellent!!! Thank you very much Rui!!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.