Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_grangercausality.wasp
Title produced by softwareBivariate Granger Causality
Date of computationWed, 09 Dec 2009 09:34:45 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2009/Dec/09/t1260376523ew2m8yldph77izt.htm/, Retrieved Mon, 29 Apr 2024 10:53:44 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=65034, Retrieved Mon, 29 Apr 2024 10:53:44 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact145
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Bivariate Granger Causality] [] [2009-12-07 08:54:13] [b98453cac15ba1066b407e146608df68]
- R PD  [Bivariate Granger Causality] [WS10 - Bivariate ...] [2009-12-08 23:10:58] [df6326eec97a6ca984a853b142930499]
-   P     [Bivariate Granger Causality] [WS10 - Bivariate ...] [2009-12-09 12:06:40] [df6326eec97a6ca984a853b142930499]
-   P         [Bivariate Granger Causality] [WS10 - Bivariate ...] [2009-12-09 16:34:45] [0cc924834281808eda7297686c82928f] [Current]
Feedback Forum

Post a new message
Dataseries X:
423.4
404.1
500
472.6
496.1
562
434.8
538.2
577.6
518.1
625.2
561.2
523.3
536.1
607.3
637.3
606.9
652.9
617.2
670.4
729.9
677.2
710
844.3
748.2
653.9
742.6
854.2
808.4
1819
1936.5
1966.1
2083.1
1620.1
1527.6
1795
1685.1
1851.8
2164.4
1981.8
1726.5
2144.6
1758.2
1672.9
1837.3
1596.1
1446
1898.4
1964.1
1755.9
2255.3
1881.2
2117.9
1656.5
1544.1
2098.9
2133.3
1963.5
1801.2
2365.4
1936.5
1667.6
1983.5
2058.6
2448.3
1858.1
1625.4
2130.6
2515.7
2230.2
2086.9
2235
2100.2
2288.6
2490
2573.7
2543.8
2004.7
2390
2338.4
2724.5
2292.5
2386
2477.9
2337
2605.1
2560.8
2839.3
2407.2
2085.2
2735.6
2798.7
3053.2
2405
2471.9
2727.3
2790.7
2385.4
3206.6
2705.6
3518.4
1954.9
2584.3
2535.8
2685.9
2866
2236.6
2934.9
2668.6
2371.2
3165.9
2887.2
3112.2
2671.2
2432.6
2812.3
3095.7
2862.9
2607.3
2862.5
Dataseries Y:
286.1
307
358.1
341.8
378.8
375.2
295.6
362.7
409.6
336.8
389.1
389.3
355.9
542
648.4
452
582.4
506.5
555.5
530.4
609.4
543.9
616.2
634.6
541.7
549.8
627.6
797.4
689.8
1576.6
1572.1
1626.4
1972.4
1509.6
1584.9
1880
1324
1777.7
2172.4
1780.3
2134.9
1838.4
1557
1755.2
1702
1577.5
1485.9
2179.1
1740.9
1724.5
2328.1
1774.1
2224.2
1536.3
1521.2
2051.8
2483.1
1929.8
1808.6
2584.9
1997.9
1639.9
2379.1
1715
2750.9
1865.4
1647.4
2180.4
2593
2057.2
2635.8
2315.4
1863.6
2038
2235.8
2222.1
2636.9
2076.8
1935.5
2086.3
2470.9
1854.6
2041.3
2170.8
1905.5
2130.2
2791.2
2539.7
2661.3
1764.9
2176.9
2458.5
2179
2242.5
2089.6
2661.6
2112
2367.3
2543
2603.9
3146.7
1789.2
2114.8
2236.3
2288.1
2173.2
1877.7
2807.4
2357.4
2107.7
2856.8
2510.8
2875
2229.7
2055.1
2545.4
2775.1
2252.2
2091.7
2433




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 2 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=65034&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=65034&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=65034&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135







Granger Causality Test: Y = f(X)
ModelRes.DFDiff. DFFp-value
Complete model103
Reduced model104-10.8061624564700750.371351265371056

\begin{tabular}{lllllllll}
\hline
Granger Causality Test: Y = f(X) \tabularnewline
Model & Res.DF & Diff. DF & F & p-value \tabularnewline
Complete model & 103 &  &  &  \tabularnewline
Reduced model & 104 & -1 & 0.806162456470075 & 0.371351265371056 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=65034&T=1

[TABLE]
[ROW][C]Granger Causality Test: Y = f(X)[/C][/ROW]
[ROW][C]Model[/C][C]Res.DF[/C][C]Diff. DF[/C][C]F[/C][C]p-value[/C][/ROW]
[ROW][C]Complete model[/C][C]103[/C][C][/C][C][/C][C][/C][/ROW]
[ROW][C]Reduced model[/C][C]104[/C][C]-1[/C][C]0.806162456470075[/C][C]0.371351265371056[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=65034&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=65034&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Granger Causality Test: Y = f(X)
ModelRes.DFDiff. DFFp-value
Complete model103
Reduced model104-10.8061624564700750.371351265371056







Granger Causality Test: X = f(Y)
ModelRes.DFDiff. DFFp-value
Complete model103
Reduced model104-15.684860206378720.0189421743137404

\begin{tabular}{lllllllll}
\hline
Granger Causality Test: X = f(Y) \tabularnewline
Model & Res.DF & Diff. DF & F & p-value \tabularnewline
Complete model & 103 &  &  &  \tabularnewline
Reduced model & 104 & -1 & 5.68486020637872 & 0.0189421743137404 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=65034&T=2

[TABLE]
[ROW][C]Granger Causality Test: X = f(Y)[/C][/ROW]
[ROW][C]Model[/C][C]Res.DF[/C][C]Diff. DF[/C][C]F[/C][C]p-value[/C][/ROW]
[ROW][C]Complete model[/C][C]103[/C][C][/C][C][/C][C][/C][/ROW]
[ROW][C]Reduced model[/C][C]104[/C][C]-1[/C][C]5.68486020637872[/C][C]0.0189421743137404[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=65034&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=65034&T=2

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Granger Causality Test: X = f(Y)
ModelRes.DFDiff. DFFp-value
Complete model103
Reduced model104-15.684860206378720.0189421743137404



Parameters (Session):
par1 = 1 ; par2 = 0 ; par3 = 0 ; par4 = 12 ; par5 = 1 ; par6 = 0 ; par7 = 0 ; par8 = 6 ;
Parameters (R input):
par1 = 1 ; par2 = 1 ; par3 = 1 ; par4 = 12 ; par5 = 1 ; par6 = 1 ; par7 = 1 ; par8 = 1 ;
R code (references can be found in the software module):
library(lmtest)
par1 <- as.numeric(par1)
par2 <- as.numeric(par2)
par3 <- as.numeric(par3)
par4 <- as.numeric(par4)
par5 <- as.numeric(par5)
par6 <- as.numeric(par6)
par7 <- as.numeric(par7)
par8 <- as.numeric(par8)
ox <- x
oy <- y
if (par1 == 0) {
x <- log(x)
} else {
x <- (x ^ par1 - 1) / par1
}
if (par5 == 0) {
y <- log(y)
} else {
y <- (y ^ par5 - 1) / par5
}
if (par2 > 0) x <- diff(x,lag=1,difference=par2)
if (par6 > 0) y <- diff(y,lag=1,difference=par6)
if (par3 > 0) x <- diff(x,lag=par4,difference=par3)
if (par7 > 0) y <- diff(y,lag=par4,difference=par7)
x
y
(gyx <- grangertest(y ~ x, order=par8))
(gxy <- grangertest(x ~ y, order=par8))
bitmap(file='test1.png')
op <- par(mfrow=c(2,1))
(r <- ccf(ox,oy,main='Cross Correlation Function (raw data)',ylab='CCF',xlab='Lag (k)'))
(r <- ccf(x,y,main='Cross Correlation Function (transformed and differenced)',ylab='CCF',xlab='Lag (k)'))
par(op)
dev.off()
bitmap(file='test2.png')
op <- par(mfrow=c(2,1))
acf(ox,lag.max=round(length(x)/2),main='ACF of x (raw)')
acf(x,lag.max=round(length(x)/2),main='ACF of x (transformed and differenced)')
par(op)
dev.off()
bitmap(file='test3.png')
op <- par(mfrow=c(2,1))
acf(oy,lag.max=round(length(y)/2),main='ACF of y (raw)')
acf(y,lag.max=round(length(y)/2),main='ACF of y (transformed and differenced)')
par(op)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Granger Causality Test: Y = f(X)',5,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Model',header=TRUE)
a<-table.element(a,'Res.DF',header=TRUE)
a<-table.element(a,'Diff. DF',header=TRUE)
a<-table.element(a,'F',header=TRUE)
a<-table.element(a,'p-value',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Complete model',header=TRUE)
a<-table.element(a,gyx$Res.Df[1])
a<-table.element(a,'')
a<-table.element(a,'')
a<-table.element(a,'')
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Reduced model',header=TRUE)
a<-table.element(a,gyx$Res.Df[2])
a<-table.element(a,gyx$Df[2])
a<-table.element(a,gyx$F[2])
a<-table.element(a,gyx$Pr[2])
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Granger Causality Test: X = f(Y)',5,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Model',header=TRUE)
a<-table.element(a,'Res.DF',header=TRUE)
a<-table.element(a,'Diff. DF',header=TRUE)
a<-table.element(a,'F',header=TRUE)
a<-table.element(a,'p-value',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Complete model',header=TRUE)
a<-table.element(a,gxy$Res.Df[1])
a<-table.element(a,'')
a<-table.element(a,'')
a<-table.element(a,'')
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Reduced model',header=TRUE)
a<-table.element(a,gxy$Res.Df[2])
a<-table.element(a,gxy$Df[2])
a<-table.element(a,gxy$F[2])
a<-table.element(a,gxy$Pr[2])
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable2.tab')