[R] test for causality

Pfaff, Bernhard Dr. Bernhard_Pfaff at fra.invesco.com
Tue Nov 17 09:24:21 CET 2009


>
>
>Hi useRs..
>
>I cant figure out how to test for causality using causality() in vars
>package
>
>I have two datasets (A, B) and i want to test if A (Granger)cause B.
>How do I write the script? I dont understand ?causality. How 

Dear Tobias,

have a look at example(causality). A Granger-causality test is a F-test.
You need to estimate a VAR first, i.e., provide the complete data set
(cbind(A, b)) in VAR() and then provide the causing variable(s) in
causality.

Best,
Bernhard


>do I get x to
>"contain" A and B. Further using the command VAR() to specify x, I dont
>either understand.
>
>Kind regards Tobias
>
>-- 
>View this message in context: 
>http://old.nabble.com/test-for-causality-tp26373931p26373931.html
>Sent from the R help mailing list archive at Nabble.com.
>
>______________________________________________
>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}}




More information about the R-help mailing list