[Vars-commits] r82 - pkg/tests
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Nov 27 13:51:59 CET 2011
Author: bpfaff
Date: 2011-11-27 13:51:59 +0100 (Sun, 27 Nov 2011)
New Revision: 82
Added:
pkg/tests/CheckCausality.Rout
pkg/tests/ExamplesTest.Rout
Removed:
pkg/tests/CheckCausality.Rout.save
pkg/tests/ExamplesTest.Rout.save
Log:
Replaced output from test files
Added: pkg/tests/CheckCausality.Rout
===================================================================
--- pkg/tests/CheckCausality.Rout (rev 0)
+++ pkg/tests/CheckCausality.Rout 2011-11-27 12:51:59 UTC (rev 82)
@@ -0,0 +1,423 @@
+
+R version 2.14.0 (2011-10-31)
+Copyright (C) 2011 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+Platform: i486-pc-linux-gnu (32-bit)
+
+R ist freie Software und kommt OHNE JEGLICHE GARANTIE.
+Sie sind eingeladen, es unter bestimmten Bedingungen weiter zu verbreiten.
+Tippen Sie 'license()' or 'licence()' für Details dazu.
+
+R ist ein Gemeinschaftsprojekt mit vielen Beitragenden.
+Tippen Sie 'contributors()' für mehr Information und 'citation()',
+um zu erfahren, wie R oder R packages in Publikationen zitiert werden können.
+
+Tippen Sie 'demo()' für einige Demos, 'help()' für on-line Hilfe, oder
+'help.start()' für eine HTML Browserschnittstelle zur Hilfe.
+Tippen Sie 'q()', um R zu verlassen.
+
+>
+>
+> ###test causality
+> library(vars)
+Lade nötiges Paket: MASS
+Lade nötiges Paket: strucchange
+Lade nötiges Paket: zoo
+
+Attache Paket: ‘zoo’
+
+The following object(s) are masked from ‘package:base’:
+
+ as.Date, as.Date.numeric
+
+Lade nötiges Paket: sandwich
+Lade nötiges Paket: urca
+Lade nötiges Paket: lmtest
+> data(Canada)
+>
+> myVar<-VAR(Canada, p=2, season=12)
+>
+> causality(myVar)
+$Granger
+
+ Granger causality H0: e do not Granger-cause prod rw U
+
+data: VAR object myVar
+F-Test = 5.6938, df1 = 6, df2 = 248, p-value = 1.454e-05
+
+
+$Instant
+
+ H0: No instantaneous causality between: e and prod rw U
+
+data: VAR object myVar
+Chi-squared = 26.0187, df = 3, p-value = 9.452e-06
+
+
+Warnmeldung:
+In causality(myVar) :
+Argument 'cause' has not been specified;
+using first variable in 'x$y' (e) as cause variable.
+
+> causality(myVar, cause="e")
+$Granger
+
+ Granger causality H0: e do not Granger-cause prod rw U
+
+data: VAR object myVar
+F-Test = 5.6938, df1 = 6, df2 = 248, p-value = 1.454e-05
+
+
+$Instant
+
+ H0: No instantaneous causality between: e and prod rw U
+
+data: VAR object myVar
+Chi-squared = 26.0187, df = 3, p-value = 9.452e-06
+
+
+> causality(myVar, cause="prod")
+$Granger
+
+ Granger causality H0: prod do not Granger-cause e rw U
+
+data: VAR object myVar
+F-Test = 2.4819, df1 = 6, df2 = 248, p-value = 0.02381
+
+
+$Instant
+
+ H0: No instantaneous causality between: prod and e rw U
+
+data: VAR object myVar
+Chi-squared = 0.2975, df = 3, p-value = 0.9605
+
+
+> causality(myVar, cause="rw")
+$Granger
+
+ Granger causality H0: rw do not Granger-cause e prod U
+
+data: VAR object myVar
+F-Test = 2.1694, df1 = 6, df2 = 248, p-value = 0.04653
+
+
+$Instant
+
+ H0: No instantaneous causality between: rw and e prod U
+
+data: VAR object myVar
+Chi-squared = 3.0925, df = 3, p-value = 0.3776
+
+
+> causality(myVar, cause="U")
+$Granger
+
+ Granger causality H0: U do not Granger-cause e prod rw
+
+data: VAR object myVar
+F-Test = 2.8427, df1 = 6, df2 = 248, p-value = 0.01076
+
+
+$Instant
+
+ H0: No instantaneous causality between: U and e prod rw
+
+data: VAR object myVar
+Chi-squared = 26.2773, df = 3, p-value = 8.344e-06
+
+
+>
+> causality(myVar, cause=c("e", "prod"))
+$Granger
+
+ Granger causality H0: e prod do not Granger-cause rw U
+
+data: VAR object myVar
+F-Test = 6.1731, df1 = 8, df2 = 248, p-value = 2.868e-07
+
+
+$Instant
+
+ H0: No instantaneous causality between: e prod and rw U
+
+data: VAR object myVar
+Chi-squared = 26.2651, df = 4, p-value = 2.798e-05
+
+
+> causality(myVar, cause=c("prod","e"))
+$Granger
+
+ Granger causality H0: e prod do not Granger-cause rw U
+
+data: VAR object myVar
+F-Test = 6.1731, df1 = 8, df2 = 248, p-value = 2.868e-07
+
+
+$Instant
+
+ H0: No instantaneous causality between: e prod and rw U
+
+data: VAR object myVar
+Chi-squared = 26.2651, df = 4, p-value = 2.798e-05
+
+
+> causality(myVar, cause=c("e", "prod","rw"))
+$Granger
+
+ Granger causality H0: e prod rw do not Granger-cause U
+
+data: VAR object myVar
+F-Test = 8.2792, df1 = 6, df2 = 248, p-value = 3.496e-08
+
+
+$Instant
+
+ H0: No instantaneous causality between: e prod rw and U
+
+data: VAR object myVar
+Chi-squared = 26.2773, df = 3, p-value = 8.344e-06
+
+
+>
+> myVar2<-VAR(Canada, p=3, type="trend")
+> causality(myVar2, cause="e")
+$Granger
+
+ Granger causality H0: e do not Granger-cause prod rw U
+
+data: VAR object myVar2
+F-Test = 4.7587, df1 = 9, df2 = 272, p-value = 6.768e-06
+
+
+$Instant
+
+ H0: No instantaneous causality between: e and prod rw U
+
+data: VAR object myVar2
+Chi-squared = 29.6646, df = 3, p-value = 1.623e-06
+
+
+> causality(myVar2, cause="prod")
+$Granger
+
+ Granger causality H0: prod do not Granger-cause e rw U
+
+data: VAR object myVar2
+F-Test = 2.3964, df1 = 9, df2 = 272, p-value = 0.01256
+
+
+$Instant
+
+ H0: No instantaneous causality between: prod and e rw U
+
+data: VAR object myVar2
+Chi-squared = 1.3713, df = 3, p-value = 0.7123
+
+
+> causality(myVar2, cause="rw")
+$Granger
+
+ Granger causality H0: rw do not Granger-cause e prod U
+
+data: VAR object myVar2
+F-Test = 2.221, df1 = 9, df2 = 272, p-value = 0.02101
+
+
+$Instant
+
+ H0: No instantaneous causality between: rw and e prod U
+
+data: VAR object myVar2
+Chi-squared = 2.3541, df = 3, p-value = 0.5022
+
+
+> causality(myVar2, cause="U")
+$Granger
+
+ Granger causality H0: U do not Granger-cause e prod rw
+
+data: VAR object myVar2
+F-Test = 2.129, df1 = 9, df2 = 272, p-value = 0.02738
+
+
+$Instant
+
+ H0: No instantaneous causality between: U and e prod rw
+
+data: VAR object myVar2
+Chi-squared = 29.6082, df = 3, p-value = 1.668e-06
+
+
+>
+> causality(myVar2, cause=c("e", "prod"))
+$Granger
+
+ Granger causality H0: e prod do not Granger-cause rw U
+
+data: VAR object myVar2
+F-Test = 4.3402, df1 = 12, df2 = 272, p-value = 2.544e-06
+
+
+$Instant
+
+ H0: No instantaneous causality between: e prod and rw U
+
+data: VAR object myVar2
+Chi-squared = 29.6006, df = 4, p-value = 5.902e-06
+
+
+> causality(myVar, cause=c("prod","e"))
+$Granger
+
+ Granger causality H0: e prod do not Granger-cause rw U
+
+data: VAR object myVar
+F-Test = 6.1731, df1 = 8, df2 = 248, p-value = 2.868e-07
+
+
+$Instant
+
+ H0: No instantaneous causality between: e prod and rw U
+
+data: VAR object myVar
+Chi-squared = 26.2651, df = 4, p-value = 2.798e-05
+
+
+> causality(myVar, cause=c("e", "prod","rw"))
+$Granger
+
+ Granger causality H0: e prod rw do not Granger-cause U
+
+data: VAR object myVar
+F-Test = 8.2792, df1 = 6, df2 = 248, p-value = 3.496e-08
+
+
+$Instant
+
+ H0: No instantaneous causality between: e prod rw and U
+
+data: VAR object myVar
+Chi-squared = 26.2773, df = 3, p-value = 8.344e-06
+
+
+>
+> myVar3<-VAR(Canada[,1:3], p=1, exogen=Canada[,4], type="none")
+Warnmeldung:
+In VAR(Canada[, 1:3], p = 1, exogen = Canada[, 4], type = "none") :
+ No column names supplied in exogen, using: exo1 , instead.
+
+>
+> causality(myVar3)
+$Granger
+
+ Granger causality H0: e do not Granger-cause prod rw
+
+data: VAR object myVar3
+F-Test = 8.0347, df1 = 2, df2 = 237, p-value = 0.0004205
+
+
+$Instant
+
+ H0: No instantaneous causality between: e and prod rw
+
+data: VAR object myVar3
+Chi-squared = 11.2607, df = 2, p-value = 0.003587
+
+
+Warnmeldung:
+In causality(myVar3) :
+Argument 'cause' has not been specified;
+using first variable in 'x$y' (e) as cause variable.
+
+> causality(myVar3, cause="e")
+$Granger
+
+ Granger causality H0: e do not Granger-cause prod rw
+
+data: VAR object myVar3
+F-Test = 8.0347, df1 = 2, df2 = 237, p-value = 0.0004205
+
+
+$Instant
+
+ H0: No instantaneous causality between: e and prod rw
+
+data: VAR object myVar3
+Chi-squared = 11.2607, df = 2, p-value = 0.003587
+
+
+> causality(myVar3, cause="prod")
+$Granger
+
+ Granger causality H0: prod do not Granger-cause e rw
+
+data: VAR object myVar3
+F-Test = 13.585, df1 = 2, df2 = 237, p-value = 2.597e-06
+
+
+$Instant
+
+ H0: No instantaneous causality between: prod and e rw
+
+data: VAR object myVar3
+Chi-squared = 4.8762, df = 2, p-value = 0.08732
+
+
+> causality(myVar3, cause="rw")
+$Granger
+
+ Granger causality H0: rw do not Granger-cause e prod
+
+data: VAR object myVar3
+F-Test = 3.7897, df1 = 2, df2 = 237, p-value = 0.02399
+
+
+$Instant
+
+ H0: No instantaneous causality between: rw and e prod
+
+data: VAR object myVar3
+Chi-squared = 8.1627, df = 2, p-value = 0.01689
+
+
+>
+> causality(myVar3, cause=c("e", "prod"))
+$Granger
+
+ Granger causality H0: e prod do not Granger-cause rw
+
+data: VAR object myVar3
+F-Test = 33.7688, df1 = 2, df2 = 237, p-value = 1.248e-13
+
+
+$Instant
+
+ H0: No instantaneous causality between: e prod and rw
+
+data: VAR object myVar3
+Chi-squared = 8.1627, df = 2, p-value = 0.01689
+
+
+> causality(myVar3, cause=c("prod","e"))
+$Granger
+
+ Granger causality H0: e prod do not Granger-cause rw
+
+data: VAR object myVar3
+F-Test = 33.7688, df1 = 2, df2 = 237, p-value = 1.248e-13
+
+
+$Instant
+
+ H0: No instantaneous causality between: e prod and rw
+
+data: VAR object myVar3
+Chi-squared = 8.1627, df = 2, p-value = 0.01689
+
+
+>
+>
+> proc.time()
+ User System verstrichen
+ 2.336 0.136 4.556
Deleted: pkg/tests/CheckCausality.Rout.save
===================================================================
--- pkg/tests/CheckCausality.Rout.save 2011-11-27 12:49:33 UTC (rev 81)
+++ pkg/tests/CheckCausality.Rout.save 2011-11-27 12:51:59 UTC (rev 82)
@@ -1,415 +0,0 @@
-
-R version 2.10.0 (2009-10-26)
-Copyright (C) 2009 The R Foundation for Statistical Computing
-ISBN 3-900051-07-0
-
-R est un logiciel libre livré sans AUCUNE GARANTIE.
-Vous pouvez le redistribuer sous certaines conditions.
-Tapez 'license()' ou 'licence()' pour plus de détails.
-
-R est un projet collaboratif avec de nombreux contributeurs.
-Tapez 'contributors()' pour plus d'information et
-'citation()' pour la façon de le citer dans les publications.
-
-Tapez 'demo()' pour des démonstrations, 'help()' pour l'aide
-en ligne ou 'help.start()' pour obtenir l'aide au format HTML.
-Tapez 'q()' pour quitter R.
-
->
->
-> ###test causality
-> library(vars)
-Le chargement a nécessité le package : MASS
-Le chargement a nécessité le package : strucchange
-Le chargement a nécessité le package : zoo
-Le chargement a nécessité le package : sandwich
-Le chargement a nécessité le package : urca
-Le chargement a nécessité le package : lmtest
-> data(Canada)
->
-> myVar<-VAR(Canada, p=2, season=12)
->
-> causality(myVar)
-$Granger
-
- Granger causality H0: e do not Granger-cause prod rw U
-
-data: VAR object myVar
-F-Test = 5.6938, df1 = 6, df2 = 248, p-value = 1.454e-05
-
-
-$Instant
-
- H0: No instantaneous causality between: e and prod rw U
-
-data: VAR object myVar
-Chi-squared = 26.0187, df = 3, p-value = 9.452e-06
-
-
-Message d'avis :
-In causality(myVar) :
-Argument 'cause' has not been specified;
-using first variable in 'x$y' (e) as cause variable.
-
-> causality(myVar, cause="e")
-$Granger
-
- Granger causality H0: e do not Granger-cause prod rw U
-
-data: VAR object myVar
-F-Test = 5.6938, df1 = 6, df2 = 248, p-value = 1.454e-05
-
-
-$Instant
-
- H0: No instantaneous causality between: e and prod rw U
-
-data: VAR object myVar
-Chi-squared = 26.0187, df = 3, p-value = 9.452e-06
-
-
-> causality(myVar, cause="prod")
-$Granger
-
- Granger causality H0: prod do not Granger-cause e rw U
-
-data: VAR object myVar
-F-Test = 2.4819, df1 = 6, df2 = 248, p-value = 0.02381
-
-
-$Instant
-
- H0: No instantaneous causality between: prod and e rw U
-
-data: VAR object myVar
-Chi-squared = 0.2975, df = 3, p-value = 0.9605
-
-
-> causality(myVar, cause="rw")
-$Granger
-
- Granger causality H0: rw do not Granger-cause e prod U
-
-data: VAR object myVar
-F-Test = 2.1694, df1 = 6, df2 = 248, p-value = 0.04653
-
-
-$Instant
-
- H0: No instantaneous causality between: rw and e prod U
-
-data: VAR object myVar
-Chi-squared = 3.0925, df = 3, p-value = 0.3776
-
-
-> causality(myVar, cause="U")
-$Granger
-
- Granger causality H0: U do not Granger-cause e prod rw
-
-data: VAR object myVar
-F-Test = 2.8427, df1 = 6, df2 = 248, p-value = 0.01076
-
-
-$Instant
-
- H0: No instantaneous causality between: U and e prod rw
-
-data: VAR object myVar
-Chi-squared = 26.2773, df = 3, p-value = 8.344e-06
-
-
->
-> causality(myVar, cause=c("e", "prod"))
-$Granger
-
- Granger causality H0: e prod do not Granger-cause rw U
-
-data: VAR object myVar
-F-Test = 6.1731, df1 = 8, df2 = 248, p-value = 2.868e-07
-
-
-$Instant
-
- H0: No instantaneous causality between: e prod and rw U
-
-data: VAR object myVar
-Chi-squared = 26.2651, df = 4, p-value = 2.798e-05
-
-
-> causality(myVar, cause=c("prod","e"))
-$Granger
-
- Granger causality H0: e prod do not Granger-cause rw U
-
-data: VAR object myVar
-F-Test = 6.1731, df1 = 8, df2 = 248, p-value = 2.868e-07
-
-
-$Instant
-
- H0: No instantaneous causality between: e prod and rw U
-
-data: VAR object myVar
-Chi-squared = 26.2651, df = 4, p-value = 2.798e-05
-
-
-> causality(myVar, cause=c("e", "prod","rw"))
-$Granger
-
- Granger causality H0: e prod rw do not Granger-cause U
-
-data: VAR object myVar
-F-Test = 8.2792, df1 = 6, df2 = 248, p-value = 3.496e-08
-
-
-$Instant
-
- H0: No instantaneous causality between: e prod rw and U
-
-data: VAR object myVar
-Chi-squared = 26.2773, df = 3, p-value = 8.344e-06
-
-
->
-> myVar2<-VAR(Canada, p=3, type="trend")
-> causality(myVar2, cause="e")
-$Granger
-
- Granger causality H0: e do not Granger-cause prod rw U
-
-data: VAR object myVar2
-F-Test = 4.7587, df1 = 9, df2 = 272, p-value = 6.768e-06
-
-
-$Instant
-
- H0: No instantaneous causality between: e and prod rw U
-
-data: VAR object myVar2
-Chi-squared = 29.6646, df = 3, p-value = 1.623e-06
-
-
-> causality(myVar2, cause="prod")
-$Granger
-
- Granger causality H0: prod do not Granger-cause e rw U
-
-data: VAR object myVar2
-F-Test = 2.3964, df1 = 9, df2 = 272, p-value = 0.01256
-
-
-$Instant
-
- H0: No instantaneous causality between: prod and e rw U
-
-data: VAR object myVar2
-Chi-squared = 1.3713, df = 3, p-value = 0.7123
-
-
-> causality(myVar2, cause="rw")
-$Granger
-
- Granger causality H0: rw do not Granger-cause e prod U
-
-data: VAR object myVar2
-F-Test = 2.221, df1 = 9, df2 = 272, p-value = 0.02101
-
-
-$Instant
-
- H0: No instantaneous causality between: rw and e prod U
-
-data: VAR object myVar2
-Chi-squared = 2.3541, df = 3, p-value = 0.5022
-
-
-> causality(myVar2, cause="U")
-$Granger
-
- Granger causality H0: U do not Granger-cause e prod rw
-
-data: VAR object myVar2
-F-Test = 2.129, df1 = 9, df2 = 272, p-value = 0.02738
-
-
-$Instant
-
- H0: No instantaneous causality between: U and e prod rw
-
-data: VAR object myVar2
-Chi-squared = 29.6082, df = 3, p-value = 1.668e-06
-
-
->
-> causality(myVar2, cause=c("e", "prod"))
-$Granger
-
- Granger causality H0: e prod do not Granger-cause rw U
-
-data: VAR object myVar2
-F-Test = 4.3402, df1 = 12, df2 = 272, p-value = 2.544e-06
-
-
-$Instant
-
- H0: No instantaneous causality between: e prod and rw U
-
-data: VAR object myVar2
-Chi-squared = 29.6006, df = 4, p-value = 5.902e-06
-
-
-> causality(myVar, cause=c("prod","e"))
-$Granger
-
- Granger causality H0: e prod do not Granger-cause rw U
-
-data: VAR object myVar
-F-Test = 6.1731, df1 = 8, df2 = 248, p-value = 2.868e-07
-
-
-$Instant
-
- H0: No instantaneous causality between: e prod and rw U
-
-data: VAR object myVar
-Chi-squared = 26.2651, df = 4, p-value = 2.798e-05
-
-
-> causality(myVar, cause=c("e", "prod","rw"))
-$Granger
-
- Granger causality H0: e prod rw do not Granger-cause U
-
-data: VAR object myVar
-F-Test = 8.2792, df1 = 6, df2 = 248, p-value = 3.496e-08
-
-
-$Instant
-
- H0: No instantaneous causality between: e prod rw and U
-
-data: VAR object myVar
-Chi-squared = 26.2773, df = 3, p-value = 8.344e-06
-
-
->
-> myVar3<-VAR(Canada[,1:3], p=1, exogen=Canada[,4], type="none")
-Message d'avis :
-In VAR(Canada[, 1:3], p = 1, exogen = Canada[, 4], type = "none") :
- No column names supplied in exogen, using: exo1 , instead.
-
->
-> causality(myVar3)
-$Granger
-
- Granger causality H0: e do not Granger-cause prod rw
-
-data: VAR object myVar3
-F-Test = 8.0347, df1 = 2, df2 = 237, p-value = 0.0004205
-
-
-$Instant
-
- H0: No instantaneous causality between: e and prod rw
-
-data: VAR object myVar3
-Chi-squared = 11.2607, df = 2, p-value = 0.003587
-
-
-Message d'avis :
-In causality(myVar3) :
-Argument 'cause' has not been specified;
-using first variable in 'x$y' (e) as cause variable.
-
-> causality(myVar3, cause="e")
-$Granger
-
- Granger causality H0: e do not Granger-cause prod rw
-
-data: VAR object myVar3
-F-Test = 8.0347, df1 = 2, df2 = 237, p-value = 0.0004205
-
-
-$Instant
-
- H0: No instantaneous causality between: e and prod rw
-
-data: VAR object myVar3
-Chi-squared = 11.2607, df = 2, p-value = 0.003587
-
-
-> causality(myVar3, cause="prod")
-$Granger
-
- Granger causality H0: prod do not Granger-cause e rw
-
-data: VAR object myVar3
-F-Test = 13.585, df1 = 2, df2 = 237, p-value = 2.597e-06
-
-
-$Instant
-
- H0: No instantaneous causality between: prod and e rw
-
-data: VAR object myVar3
-Chi-squared = 4.8762, df = 2, p-value = 0.08732
-
-
-> causality(myVar3, cause="rw")
-$Granger
-
- Granger causality H0: rw do not Granger-cause e prod
-
-data: VAR object myVar3
-F-Test = 3.7897, df1 = 2, df2 = 237, p-value = 0.02399
-
-
-$Instant
-
- H0: No instantaneous causality between: rw and e prod
-
-data: VAR object myVar3
-Chi-squared = 8.1627, df = 2, p-value = 0.01689
-
-
->
-> causality(myVar3, cause=c("e", "prod"))
-$Granger
-
- Granger causality H0: e prod do not Granger-cause rw
-
-data: VAR object myVar3
-F-Test = 33.7688, df1 = 2, df2 = 237, p-value = 1.248e-13
-
-
-$Instant
-
- H0: No instantaneous causality between: e prod and rw
-
-data: VAR object myVar3
-Chi-squared = 8.1627, df = 2, p-value = 0.01689
-
-
-> causality(myVar3, cause=c("prod","e"))
-$Granger
-
- Granger causality H0: e prod do not Granger-cause rw
-
-data: VAR object myVar3
-F-Test = 33.7688, df1 = 2, df2 = 237, p-value = 1.248e-13
-
-
-$Instant
-
- H0: No instantaneous causality between: e prod and rw
-
-data: VAR object myVar3
-Chi-squared = 8.1627, df = 2, p-value = 0.01689
-
-
->
->
-> proc.time()
-utilisateur système écoulé
- 2.328 0.064 2.570
Added: pkg/tests/ExamplesTest.Rout
===================================================================
--- pkg/tests/ExamplesTest.Rout (rev 0)
+++ pkg/tests/ExamplesTest.Rout 2011-11-27 12:51:59 UTC (rev 82)
@@ -0,0 +1,911 @@
+
+R version 2.14.0 (2011-10-31)
+Copyright (C) 2011 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+Platform: i486-pc-linux-gnu (32-bit)
+
+R ist freie Software und kommt OHNE JEGLICHE GARANTIE.
+Sie sind eingeladen, es unter bestimmten Bedingungen weiter zu verbreiten.
+Tippen Sie 'license()' or 'licence()' für Details dazu.
+
+R ist ein Gemeinschaftsprojekt mit vielen Beitragenden.
+Tippen Sie 'contributors()' für mehr Information und 'citation()',
+um zu erfahren, wie R oder R packages in Publikationen zitiert werden können.
+
+Tippen Sie 'demo()' für einige Demos, 'help()' für on-line Hilfe, oder
+'help.start()' für eine HTML Browserschnittstelle zur Hilfe.
+Tippen Sie 'q()', um R zu verlassen.
+
+[Vorher gesicherter Workspace wiederhergestellt]
+
+> library(vars)
+Lade nötiges Paket: MASS
+Lade nötiges Paket: strucchange
+Lade nötiges Paket: zoo
+
+Attache Paket: ‘zoo’
+
+The following object(s) are masked from ‘package:base’:
+
+ as.Date, as.Date.numeric
+
+Lade nötiges Paket: sandwich
+Lade nötiges Paket: urca
+Lade nötiges Paket: lmtest
+>
+>
+>
+> example(Acoef)
+
+Acoef> data(Canada)
+
+Acoef> var.2c <- VAR(Canada, p = 2, type = "const")
+
+Acoef> Acoef(var.2c)
+[[1]]
+ e.l1 prod.l1 rw.l1 U.l1
+e 1.6378206 0.16727167 -0.06311863 0.26558478
+prod -0.1727658 1.15042820 0.05130390 -0.47850131
+rw -0.2688329 -0.08106500 0.89547833 0.01213003
+U -0.5807638 -0.07811707 0.01866214 0.61893150
+
+[[2]]
+ e.l2 prod.l2 rw.l2 U.l2
+e -0.4971338 -0.101650067 0.003844492 0.13268931
+prod 0.3852589 -0.172411873 -0.118851043 1.01591801
+rw 0.3678489 -0.005180947 0.052676565 -0.12770826
+U 0.4098182 0.052116684 0.041801152 -0.07116885
+
+> example(arch.test)
+
+arch.t> data(Canada)
+
+arch.t> var.2c <- VAR(Canada, p = 2, type = "const")
+
+arch.t> arch.test(var.2c)
+
+ ARCH (multivariate)
+
+data: Residuals of VAR object var.2c
+Chi-squared = 538.8897, df = 500, p-value = 0.1112
+
+> example(Bcoef)
+
+Bcoef> data(Canada)
+
+Bcoef> var.2c <- VAR(Canada, p = 2, type = "const")
+
+Bcoef> Bcoef(var.2c)
+ e.l1 prod.l1 rw.l1 U.l1 e.l2 prod.l2
+e 1.6378206 0.16727167 -0.06311863 0.26558478 -0.4971338 -0.101650067
+prod -0.1727658 1.15042820 0.05130390 -0.47850131 0.3852589 -0.172411873
+rw -0.2688329 -0.08106500 0.89547833 0.01213003 0.3678489 -0.005180947
+U -0.5807638 -0.07811707 0.01866214 0.61893150 0.4098182 0.052116684
+ rw.l2 U.l2 const
+e 0.003844492 0.13268931 -136.99845
+prod -0.118851043 1.01591801 -166.77552
+rw 0.052676565 -0.12770826 -33.18834
+U 0.041801152 -0.07116885 149.78056
+> example(BQ)
+
+BQ> data(Canada)
+
+BQ> var.2c <- VAR(Canada, p = 2, type = "const")
+
+BQ> BQ(var.2c)
+
+SVAR Estimation Results:
+========================
+
+
+Estimated contemporaneous impact matrix:
+ e prod rw U
+e -0.007644 -0.28470 0.07374 -0.21234
+prod 0.543663 0.21658 -0.03379 -0.28652
+rw 0.082112 0.28588 0.71874 0.06162
+U 0.129451 0.05668 -0.01039 0.24111
+
+Estimated identified long run impact matrix:
+ e prod rw U
+e 104.37 0.0000 0.00 0.0000
+prod 45.35 5.1971 0.00 0.0000
+rw 168.41 -2.1145 10.72 0.0000
+U -19.26 -0.4562 1.41 0.5331
+> example(causality)
+
+caslty> data(Canada)
+
+caslty> var.2c <- VAR(Canada, p = 2, type = "const")
+
+caslty> causality(var.2c, cause = "e")
+$Granger
+
+ Granger causality H0: e do not Granger-cause prod rw U
+
+data: VAR object var.2c
+F-Test = 6.2768, df1 = 6, df2 = 292, p-value = 3.206e-06
+
+
+$Instant
+
+ H0: No instantaneous causality between: e and prod rw U
+
+data: VAR object var.2c
+Chi-squared = 26.0685, df = 3, p-value = 9.228e-06
+
+
+
+caslty> #use a robust HC variance-covariance matrix for the Granger test:
+caslty> causality(var.2c, cause = "e", vcov.=vcovHC(var.2c))
+$Granger
+
+ Granger causality H0: e do not Granger-cause prod rw U
+
+data: VAR object var.2c
+F-Test = 6.4593, df1 = 6, df2 = 292, p-value = 2.072e-06
+
+
+$Instant
+
+ H0: No instantaneous causality between: e and prod rw U
+
+data: VAR object var.2c
+Chi-squared = 26.0685, df = 3, p-value = 9.228e-06
+
+
+
+caslty> #use a wild-bootstrap procedure to for the Granger test
+caslty> ## Not run: causality(var.2c, cause = "e", boot=TRUE, boot.runs=1000)
+caslty>
+caslty>
+caslty>
+> example(fanchart)
+
+fnchrt> ## Not run:
+fnchrt> ##D data(Canada)
+fnchrt> ##D var.2c <- VAR(Canada, p = 2, type = "const")
+fnchrt> ##D var.2c.prd <- predict(var.2c, n.ahead = 8, ci = 0.95)
+fnchrt> ##D fanchart(var.2c.prd)
+fnchrt> ## End(Not run)
+fnchrt>
+fnchrt>
+fnchrt>
+> example(fevd)
+
+fevd> data(Canada)
+
+fevd> var.2c <- VAR(Canada, p = 2, type = "const")
+
+fevd> fevd(var.2c, n.ahead = 5)
+$e
+ e prod rw U
+[1,] 1.0000000 0.00000000 0.000000000 0.000000000
+[2,] 0.9633815 0.02563062 0.004448081 0.006539797
+[3,] 0.8961692 0.06797131 0.013226872 0.022632567
+[4,] 0.8057174 0.11757589 0.025689192 0.051017495
+[5,] 0.7019003 0.16952744 0.040094324 0.088477959
+
+$prod
+ e prod rw U
+[1,] 0.0009954282 0.9990046 0.000000000 0.000000000
+[2,] 0.0004271364 0.9889540 0.001068905 0.009549939
+[3,] 0.0004117451 0.9923920 0.000714736 0.006481511
+[4,] 0.0005161018 0.9808528 0.003294103 0.015337005
+[5,] 0.0030112576 0.9554064 0.008196778 0.033385578
+
+$rw
+ e prod rw U
+[1,] 0.02211315 0.014952942 0.9629339 0.000000e+00
+[2,] 0.04843396 0.009077935 0.9424827 5.449178e-06
+[3,] 0.05435699 0.008694159 0.9364211 5.277244e-04
+[4,] 0.04758894 0.015753861 0.9345505 2.106688e-03
+[5,] 0.03957649 0.026911791 0.9287321 4.779622e-03
+
+$U
+ e prod rw U
+[1,] 0.4636211 0.003008244 0.002479203 0.5308915
+[2,] 0.7068777 0.008843922 0.003513667 0.2807647
+[3,] 0.7787875 0.037185141 0.020355796 0.1636716
+[4,] 0.7596609 0.079197860 0.046371393 0.1147699
+[5,] 0.6886156 0.128139114 0.076164201 0.1070811
+
+> example(irf)
+
+irf> data(Canada)
+
+irf> ## For VAR
+irf> var.2c <- VAR(Canada, p = 2, type = "const")
+
+irf> irf(var.2c, impulse = "e", response = c("prod", "rw", "U"), boot =
+irf+ FALSE)
+
+Impulse response coefficients
+$e
+ prod rw U
+ [1,] -0.020585541 -0.116033519 -0.190420048
+ [2,] -0.001200947 -0.202083140 -0.329124153
+ [3,] 0.014808436 -0.180277335 -0.369053587
+ [4,] -0.021571434 -0.100425475 -0.352501745
+ [5,] -0.084914238 0.008049928 -0.300681928
+ [6,] -0.155700530 0.126762159 -0.229617289
+ [7,] -0.221442354 0.241833321 -0.151593876
+ [8,] -0.274945401 0.343821736 -0.075179522
+ [9,] -0.313059778 0.427131741 -0.005842792
+[10,] -0.335382897 0.489230185 0.053372767
+[11,] -0.343203150 0.529860661 0.101208799
+
+
+irf> ## For SVAR
+irf> amat <- diag(4)
+
+irf> diag(amat) <- NA
+
+irf> svar.a <- SVAR(var.2c, estmethod = "direct", Amat = amat)
+
+irf> irf(svar.a, impulse = "e", response = c("prod", "rw", "U"), boot =
+irf+ FALSE)
+
+Impulse response coefficients
+$e
+ prod rw U
+ [1,] 0.00000000 0.00000000 0.0000000
+ [2,] -0.06268865 -0.09754690 -0.2107321
+ [3,] 0.06083197 -0.11111458 -0.3237895
+ [4,] 0.12990844 -0.06461442 -0.3815257
+ [5,] 0.14414443 0.01290689 -0.3982625
+ [6,] 0.12252595 0.11227775 -0.3826520
+ [7,] 0.08032392 0.22380618 -0.3444779
+ [8,] 0.02978788 0.33828494 -0.2925832
+ [9,] -0.02039436 0.44809056 -0.2342600
+[10,] -0.06469598 0.54753637 -0.1750896
+[11,] -0.10009271 0.63288686 -0.1190199
+
+> example(normality.test)
+
+nrmlt.> data(Canada)
+
+nrmlt.> var.2c <- VAR(Canada, p = 2, type = "const")
+
+nrmlt.> normality.test(var.2c)
+$JB
+
+ JB-Test (multivariate)
+
+data: Residuals of VAR object var.2c
+Chi-squared = 5.094, df = 8, p-value = 0.7475
+
+
+$Skewness
+
+ Skewness only (multivariate)
+
+data: Residuals of VAR object var.2c
+Chi-squared = 1.7761, df = 4, p-value = 0.7769
+
+
+$Kurtosis
+
+ Kurtosis only (multivariate)
+
+data: Residuals of VAR object var.2c
+Chi-squared = 3.3179, df = 4, p-value = 0.5061
+
+
+> example(Phi)
+
+Phi> data(Canada)
+
+Phi> var.2c <- VAR(Canada, p = 2, type = "const")
+
+Phi> Phi(var.2c, nstep=4)
+, , 1
+
+ [,1] [,2] [,3] [,4]
+[1,] 1 0 0 0
+[2,] 0 1 0 0
+[3,] 0 0 1 0
+[4,] 0 0 0 1
+
+, , 2
+
+ [,1] [,2] [,3] [,4]
+[1,] 1.6378206 0.16727167 -0.06311863 0.26558478
+[2,] -0.1727658 1.15042820 0.05130390 -0.47850131
+[3,] -0.2688329 -0.08106500 0.89547833 0.01213003
+[4,] -0.5807638 -0.07811707 0.01866214 0.61893150
+
+, , 3
+
+ [,1] [,2] [,3] [,4]
+[1,] 2.0191501 0.3491150 -0.14251580 0.6512430
+[2,] 0.1676489 1.1553945 -0.01191318 0.1240154
+[3,] -0.3062245 -0.2169480 0.86759379 -0.1419466
+[4,] -0.8923428 -0.1847587 0.10271259 0.1952708
+
+, , 4
+
+ [,1] [,2] [,3] [,4]
+[1,] 2.2426353 0.5189024 -0.2308082 1.1469646
+[2,] 0.3580192 1.1425299 -0.1143523 0.7415988
+[3,] -0.1780731 -0.3227527 0.8387395 -0.2880998
+[4,] -1.0514599 -0.2807327 0.1763723 -0.2293339
+
+, , 5
+
+ [,1] [,2] [,3] [,4]
+[1,] 2.32449796 0.6704429 -0.3142239 1.6488512
+[2,] 0.39725263 1.1159032 -0.1846605 1.1947208
+[3,] 0.03557054 -0.3899379 0.8047533 -0.4227269
+[4,] -1.09758548 -0.3630190 0.2377230 -0.6178418
+
+> example(Psi)
+
+Psi> data(Canada)
+
+Psi> var.2c <- VAR(Canada, p = 2, type = "const")
+
+Psi> Psi(var.2c, nstep=4)
+, , 1
+
+ [,1] [,2] [,3] [,4]
+[1,] 0.36281502 0.00000000 0.00000000 0.000000
+[2,] -0.02058554 0.65214032 0.00000000 0.000000
+[3,] -0.11603352 0.09541606 0.76569598 0.000000
+[4,] -0.19042005 0.01533867 0.01392474 0.203767
+
+, , 2
+
+ [,1] [,2] [,3] [,4]
+[1,] 0.547533747 0.10713578 -0.04463148 0.054117425
+[2,] -0.001200947 0.74779626 0.03262018 -0.097502799
+[3,] -0.202083140 0.03276331 0.68583307 0.002471701
+[4,] -0.329124153 -0.03966904 0.02290799 0.126117843
+
+, , 3
+
+ [,1] [,2] [,3] [,4]
+[1,] 0.61791814 0.22406285 -0.100055386 0.13270186
+[2,] 0.01480844 0.75424487 -0.007394995 0.02527026
+[3,] -0.18027734 -0.06087546 0.662336510 -0.02892404
+[4,] -0.36905359 -0.10769297 0.081365710 0.03978976
+
+, , 4
+
+ [,1] [,2] [,3] [,4]
+[1,] 0.61135633 0.3339673 -0.16075773 0.23371359
+[2,] -0.02157143 0.7455539 -0.07723254 0.15111339
+[3,] -0.10042548 -0.1348699 0.63820776 -0.05870525
+[4,] -0.35250174 -0.1697660 0.13185418 -0.04673068
+
+, , 5
+
+ [,1] [,2] [,3] [,4]
+[1,] 0.552047524 0.4325320 -0.2176401 0.33598154
+[2,] -0.084914238 0.7284313 -0.1247576 0.24344474
+[3,] 0.008049928 -0.1839919 0.6103100 -0.08613782
+[4,] -0.300681928 -0.2235336 0.1734203 -0.12589580
+
+> example(restrict)
+
+rstrct> data(Canada)
+
+rstrct> var.2c <- VAR(Canada, p = 2, type = "const")
+
+rstrct> ## Restrictions determined by thresh
+rstrct> restrict(var.2c, method = "ser")
+
+VAR Estimation Results:
+=======================
+
+Estimated coefficients for equation e:
+======================================
+Call:
+e = e.l1 + prod.l1 + rw.l1 + U.l1 + e.l2 + const
+
+ e.l1 prod.l1 rw.l1 U.l1 e.l2
+ 1.72458925 0.07872263 -0.05370603 0.39150612 -0.60070476
+ const
+-128.89450474
+
+
+Estimated coefficients for equation prod:
+=========================================
+Call:
+prod = prod.l1 + e.l2 + rw.l2 + U.l2 + const
+
+ prod.l1 e.l2 rw.l2 U.l2 const
+ 1.00809918 0.28943990 -0.09728839 0.75036470 -240.56045005
+
+
+Estimated coefficients for equation rw:
+=======================================
+Call:
+rw = prod.l1 + rw.l1 + e.l2 + U.l2
+
+ prod.l1 rw.l1 e.l2 U.l2
+-0.11816412 0.96382332 0.07092345 -0.19300125
+
+
+Estimated coefficients for equation U:
+======================================
+Call:
+U = e.l1 + U.l1 + e.l2 + rw.l2 + const
+
+ e.l1 U.l1 e.l2 rw.l2 const
+ -0.69545493 0.56002276 0.52253799 0.05670873 142.63164064
+
+
+
+rstrct> ## Restrictions set manually
+rstrct> restrict <- matrix(c(1, 1, 1, 1, 1, 1, 0, 0, 0,
+rstrct+ 1, 0, 1, 0, 0, 1, 0, 1, 1,
+rstrct+ 0, 0, 1, 1, 0, 1, 0, 0, 1,
+rstrct+ 1, 1, 1, 0, 1, 1, 0, 1, 0),
+rstrct+ nrow=4, ncol=9, byrow=TRUE)
+
+rstrct> restrict(var.2c, method = "man", resmat = restrict)
+
+VAR Estimation Results:
+=======================
+
+Estimated coefficients for equation e:
+======================================
+Call:
+e = e.l1 + prod.l1 + rw.l1 + U.l1 + e.l2 + prod.l2
+
+ e.l1 prod.l1 rw.l1 U.l1 e.l2 prod.l2
+ 1.60267870 0.17587118 0.00178938 0.05416930 -0.63243410 -0.10982496
+
+
+Estimated coefficients for equation prod:
+=========================================
+Call:
+prod = e.l1 + rw.l1 + prod.l2 + U.l2 + const
+
+ e.l1 rw.l1 prod.l2 U.l2 const
+ 0.2963549 -0.0891558 0.9673667 0.8139226 -234.5271114
+
+
+Estimated coefficients for equation rw:
+=======================================
+Call:
+rw = rw.l1 + U.l1 + prod.l2 + const
+
+ rw.l1 U.l1 prod.l2 const
+ 0.9886096 -0.3319561 -0.1263612 60.6317163
+
+
+Estimated coefficients for equation U:
+======================================
+Call:
+U = e.l1 + prod.l1 + rw.l1 + e.l2 + prod.l2 + U.l2
+
+ e.l1 prod.l1 rw.l1 e.l2 prod.l2 U.l2
+-1.074192674 -0.085839420 -0.007743894 1.086784714 0.068131754 0.909941549
+
+
+> example(roots)
+
+roots> data(Canada)
+
+roots> var.2c <- VAR(Canada, p = 2, type = "const")
+
+roots> roots(var.2c)
+[1] 0.9950338 0.9081062 0.9081062 0.7380565 0.7380565 0.1856381 0.1428889
+[8] 0.1428889
+> example(serial.test)
+
+srl.ts> data(Canada)
+
+srl.ts> var.2c <- VAR(Canada, p = 2, type = "const")
+
+srl.ts> serial.test(var.2c, lags.pt = 16, type = "PT.adjusted")
+
+ Portmanteau Test (adjusted)
+
+data: Residuals of VAR object var.2c
+Chi-squared = 231.5907, df = 224, p-value = 0.3497
+
+> example(stability)
+
+stblty> data(Canada)
+
+stblty> var.2c <- VAR(Canada, p = 2, type = "const")
+
+stblty> var.2c.stabil <- stability(var.2c, type = "OLS-CUSUM")
+
+stblty> var.2c.stabil
+$e
+
+Empirical Fluctuation Process: OLS-based CUSUM test
+
+Call: efp(formula = formula, data = data, type = type, h = h, dynamic = dynamic,
+ rescale = rescale)
+
+
+$prod
+
+Empirical Fluctuation Process: OLS-based CUSUM test
+
+Call: efp(formula = formula, data = data, type = type, h = h, dynamic = dynamic,
+ rescale = rescale)
+
+
+$rw
+
+Empirical Fluctuation Process: OLS-based CUSUM test
+
+Call: efp(formula = formula, data = data, type = type, h = h, dynamic = dynamic,
+ rescale = rescale)
+
+
+$U
+
+Empirical Fluctuation Process: OLS-based CUSUM test
+
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/vars -r 82
More information about the Vars-commits
mailing list