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 computationFri, 11 Dec 2009 11:26:06 -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/11/t1260556060x7gpmwlywjn3xxv.htm/, Retrieved Sun, 28 Apr 2024 18:59:01 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=66635, Retrieved Sun, 28 Apr 2024 18:59:01 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact213
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Explorative Data Analysis] [Run Sequence gebo...] [2008-12-12 13:32:37] [76963dc1903f0f612b6153510a3818cf]
- R  D  [Univariate Explorative Data Analysis] [Run Sequence gebo...] [2008-12-17 12:14:40] [76963dc1903f0f612b6153510a3818cf]
-         [Univariate Explorative Data Analysis] [Run Sequence Plot...] [2008-12-22 18:19:51] [1ce0d16c8f4225c977b42c8fa93bc163]
- RMP       [(Partial) Autocorrelation Function] [Identifying Integ...] [2009-11-22 12:16:10] [b98453cac15ba1066b407e146608df68]
-    D        [(Partial) Autocorrelation Function] [ws8] [2009-11-24 20:12:27] [8b1aef4e7013bd33fbc2a5833375c5f5]
-    D          [(Partial) Autocorrelation Function] [SHw WS8] [2009-11-25 18:52:43] [af2352cd9a951bedd08ebe247d0de1a2]
- RMPD              [Bivariate Granger Causality] [] [2009-12-11 18:26:06] [71596e6a53ccce532e52aaf6113616ef] [Current]
- RMPD                [Variance Reduction Matrix] [] [2009-12-17 11:59:50] [09f192433169b2c787c4a71fde86e883]
- RMPD                [Spectral Analysis] [] [2009-12-17 12:13:14] [09f192433169b2c787c4a71fde86e883]
- RMPD                [Spectral Analysis] [] [2009-12-17 12:14:53] [09f192433169b2c787c4a71fde86e883]
- RMPD                [Standard Deviation-Mean Plot] [] [2009-12-17 12:17:22] [09f192433169b2c787c4a71fde86e883]
- RMPD                [ARIMA Backward Selection] [] [2009-12-17 12:23:25] [09f192433169b2c787c4a71fde86e883]
Feedback Forum

Post a new message
Dataseries X:
252.5
251.1
255.1
258.3
255.3
261.1
253.8
252.9
253.9
255.5
262
262.8
263.3
262.5
269.2
270.8
274.1
273
267.3
267.1
268.2
270.2
271.5
281
280.1
281.5
285.9
289.8
292.9
291.2
291.8
289.8
292.5
290.3
297.5
307.5
304.7
304.6
310.7
310.7
315.7
314.7
312.2
312.8
314.3
319.7
319.9
329.5
326.9
329.7
335.7
337.2
339.7
338.3
339.2
342.5
342.2
338.3
339
345.9
Dataseries Y:
85.9
76.8
96.2
83.9
88.7
105.4
86.7
76.3
93.2
105.1
121
163
94.7
78.4
101.4
91.2
89.9
112.2
81.5
78.8
99.1
101.3
91.5
152.6
86.6
86.6
98.5
86.7
89.1
111
92.6
85.1
116.1
98.3
97.7
177.9
94.2
83.8
109.5
102.3
102.5
162.7
85.3
88.2
104.7
99.4
113.8
166.6
89.2
93.2
115
97.2
112.5
121.8
100.2
93.8
113.6
110.7
127.6
185.9




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=66635&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=66635&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66635&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 model28
Reduced model34-64.980485745627260.00139115339142478

\begin{tabular}{lllllllll}
\hline
Granger Causality Test: Y = f(X) \tabularnewline
Model & Res.DF & Diff. DF & F & p-value \tabularnewline
Complete model & 28 &  &  &  \tabularnewline
Reduced model & 34 & -6 & 4.98048574562726 & 0.00139115339142478 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=66635&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]28[/C][C][/C][C][/C][C][/C][/ROW]
[ROW][C]Reduced model[/C][C]34[/C][C]-6[/C][C]4.98048574562726[/C][C]0.00139115339142478[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=66635&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66635&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 model28
Reduced model34-64.980485745627260.00139115339142478







Granger Causality Test: X = f(Y)
ModelRes.DFDiff. DFFp-value
Complete model28
Reduced model34-62.478098323578270.0475481398623699

\begin{tabular}{lllllllll}
\hline
Granger Causality Test: X = f(Y) \tabularnewline
Model & Res.DF & Diff. DF & F & p-value \tabularnewline
Complete model & 28 &  &  &  \tabularnewline
Reduced model & 34 & -6 & 2.47809832357827 & 0.0475481398623699 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=66635&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]28[/C][C][/C][C][/C][C][/C][/ROW]
[ROW][C]Reduced model[/C][C]34[/C][C]-6[/C][C]2.47809832357827[/C][C]0.0475481398623699[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=66635&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66635&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 model28
Reduced model34-62.478098323578270.0475481398623699



Parameters (Session):
par1 = 1 ; par2 = 1 ; par3 = 1 ; par4 = 12 ; par5 = 1 ; par6 = 1 ; par7 = 1 ; par8 = 6 ;
Parameters (R input):
par1 = 1 ; par2 = 1 ; par3 = 1 ; par4 = 12 ; par5 = 1 ; par6 = 1 ; par7 = 1 ; par8 = 6 ;
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')