Grokbase Groups R r-help April 2011
FAQ
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

Search Discussions

  • Pfaff, Bernhard Dr. at Apr 5, 2011 at 8:11 am
    The below email was cross-posted to R-Sig-Finance and has been answered there.
    -----Urspr?ngliche Nachricht-----
    Von: r-help-bounces at r-project.org
    [mailto:r-help-bounces at r-project.org] Im Auftrag von ivan
    Gesendet: Montag, 4. April 2011 20:24
    An: r-help at r-project.org
    Betreff: [R] Granger Causality in a VAR Model

    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.
    *****************************************************************
    Confidentiality Note: The information contained in this ...{{dropped:10}}

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupr-help @
categoriesr
postedApr 4, '11 at 6:23p
activeApr 5, '11 at 8:11a
posts2
users2
websiter-project.org
irc#r

2 users in discussion

Ivan: 1 post Pfaff, Bernhard Dr.: 1 post

People

Translate

site design / logo © 2022 Grokbase