# [R-SIG-Finance] Granger Causality in VAR Model

ivan i.petzev at gmail.com
Tue Apr 5 13:42:24 CEST 2011

```Hello, thank you very much. You were a great help.

On Tue, Apr 5, 2011 at 10:01 AM, Pfaff, Bernhard Dr.
<Bernhard_Pfaff at fra.invesco.com> wrote:
> Hello Ivan,
>
> this is most easily achieved, if you supply z as an exogenous variable. Hence, the dimension of your VAR reduces from three (x, y, z) to two (x, y). See ?VAR for available arguments.
>
> Best,
> Bernhard
>
>> -----Ursprüngliche Nachricht-----
>> Von: r-sig-finance-bounces at r-project.org
>> [mailto:r-sig-finance-bounces at r-project.org] Im Auftrag von ivan
>> Gesendet: Dienstag, 5. April 2011 00:21
>> An: r-sig-finance at r-project.org
>> Betreff: [R-SIG-Finance] Granger Causality in 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)?
>>
>>
>> Best Regards
>>
>> _______________________________________________
>> R-SIG-Finance at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only. If you want to post, subscribe first.
>> -- Also note that this is not the r-help list where general R
>> questions should go.
>>
> *****************************************************************
> Confidentiality Note: The information contained in this message,
> and any attachments, may contain confidential and/or privileged
> material. It is intended solely for the person(s) or entity to
> which it is addressed. Any review, retransmission, dissemination,
> or taking of any action in reliance upon this information by
> persons or entities other than the intended recipient(s) is