[R] Granger Causality in a VAR Model

From: ivan <i.petzev_at_gmail.com>
Date: Mon, 04 Apr 2011 20:23:47 +0200


Dear Community,

I am new to R and have a question concerning the causality () test in the vars package. I need to test whether, say, the variable y Granger causes the variable x, given z as a control variable.

I estimated the VAR model as follows: >model<-VAR(cbind(x,y,z),p=2)

Then I did the following: >causality(model, cause="y"). I thing this tests the Granger causality of y on the vector (x,z), though. How can I implement the test for y causing x controlled for z? Thus, the F-test comparing the two models M1:x~lagged(x)+lagged(z) and M2:x~lagged(x)+lagged(y)+lagged(z)?

Thank you in advance.

Best Regards



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 04 Apr 2011 - 18:27:39 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 05 Apr 2011 - 08:30:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive