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)
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)
Browser other questions tagged r
You are not signed in. Login or sign up in order to post.
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 packageurcanor has a function for this test. It can explain better what you want?– Rui Barradas
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
– Everton Toledo
The package
lmtesthas a functiongrangertest. Example:lmtest::grangertest(lrm1.dl1 ~ ect1, data = sjf.vecm.rls$rlm$model). But there are other packages, to find them try to install the packagesosand runsos::findFn('granger causality test').– Rui Barradas
Excellent!!! Thank you very much Rui!!
– Everton Toledo