Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_cross.wasp
Title produced by softwareCross Correlation Function
Date of computationTue, 02 Dec 2008 08:13:35 -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/2008/Dec/02/t1228230874v9ugwba2ttaexc7.htm/, Retrieved Sun, 19 May 2024 10:24:04 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=27930, Retrieved Sun, 19 May 2024 10:24:04 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact177
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [Cross Correlation Function] [Non-stationary ti...] [2008-12-02 14:37:27] [6c955a33a02d5e30e404487434e7a5c9]
F   PD    [Cross Correlation Function] [Non-stationary ti...] [2008-12-02 15:13:35] [a57a97ff9690154d18ed2c72b6ae351a] [Current]
Feedback Forum
2008-12-04 11:05:50 [Steven Vercammen] [reply
Deze vraag heb ik correct beantwoord.
We zien dat er nog steeds sprake is van voorspelbaarheid voor k=-4, k=-1en k=2, maar de voorspelbaarheid is al stuk minder dan in Q7. Dit betekent dus dat er sprake was van een schijncorrelatie. Er was een ‘Z’ die invloed had op beide variabelen en dus zorgde voor een schijnbare correlatie tussen X en Y. In bovenstaande grafiek is de invloed van die Z geëlimineerd. Dit geeft dus een betrouwbaarder beeld en toont aan dat we Y veel minder goed kunnen voorspellen op basis van vroegere en toekomstige waarden van X.
2008-12-07 10:10:20 [Käthe Vanderheggen] [reply
Dit is zeer goed opgelost. Niet de hele tijdreeks kan verklaard worden door deze te differentiëren want er liggen nog steeds waarden buiten het betrouwbaarheidsinterval.
2008-12-08 18:47:13 [Koen Van Baelen] [reply
Correct. Er is inderdaad nog maar voorspelbaarheid in enkele gevallen, namelijk waar het betrouwbaarheidsinterval overschreden wordt. Hierdoor kunnen we concluderen dat er sprake was van een nonsencorrelatie hiervoor. Dit kan bijvoorbeeld zoals de student juist uitlegt dat er een variabele Z invloed uitoefent op X en Y en zorgt voor een schijnbaar verband maar dat dus niet waar is.

Post a new message
Dataseries X:
93.4
101.5
110.4
105.9
108.4
113.9
86.1
69.4
101.2
100.5
98.0
106.6
90.1
96.9
125.9
112.0
100.0
123.9
79.8
83.4
113.6
112.9
104.0
109.9
99.0
106.3
128.9
111.1
102.9
130.0
87.0
87.5
117.6
103.4
110.8
112.6
102.5
112.4
135.6
105.1
127.7
137.0
91.0
90.5
122.4
123.3
124.3
120.0
118.1
119.0
142.7
123.6
129.6
151.6
110.4
99.2
130.5
136.2
129.7
128.0
121.6
135.8
143.8
147.5
136.2
156.6
123.3
104.5
143.6
Dataseries Y:
2.84
2.78
2.63
2.54
2.56
2.19
2.09
2.06
2.08
2.05
2.03
2.04
2.03
2.01
2.01
2.01
2.01
2.01
2.01
2.02
2.02
2.03
2.05
2.08
2.07
2.06
2.05
2.05
2.05
2.05
2.05
2.06
2.06
2.07
2.07
2.30
2.31
2.31
2.53
2.58
2.59
2.73
2.82
3.00
3.04
3.23
3.32
3.49
3.57
3.56
3.72
3.82
3.82
3.98
4.06
4.08
4.19
4.16
4.17
4.21
4.21
4.17
4.19
4.25
4.25
4.20
4.33
4.41
4.56




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 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 & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=27930&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]1 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=27930&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=27930&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 time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135







Cross Correlation Function
ParameterValue
Box-Cox transformation parameter (lambda) of X series0.5
Degree of non-seasonal differencing (d) of X series0
Degree of seasonal differencing (D) of X series1
Seasonal Period (s)12
Box-Cox transformation parameter (lambda) of Y series-1.7
Degree of non-seasonal differencing (d) of Y series1
Degree of seasonal differencing (D) of Y series1
krho(Y[t],X[t+k])
-14-0.00431381240300947
-130.111397822504153
-12-0.0475687178125955
-11-0.117181358801256
-10-0.0258154857728156
-9-0.200918647992180
-8-0.195718265186021
-7-0.0599250514734523
-6-0.229863660149624
-5-0.205488708237757
-4-0.32764257167239
-3-0.230142225957488
-2-0.0249063662922654
-1-0.421482615356873
0-0.223432118665445
1-0.0479046609271945
2-0.392007548062422
30.220533792759816
40.061980169537483
5-0.236049022115555
60.181761626372412
7-0.113597353913149
80.0380518057770374
9-0.00686882982049242
10-0.0726888673777125
110.052332641520823
12-0.0523534017676355
130.00513184563827432
140.0921411155103819

\begin{tabular}{lllllllll}
\hline
Cross Correlation Function \tabularnewline
Parameter & Value \tabularnewline
Box-Cox transformation parameter (lambda) of X series & 0.5 \tabularnewline
Degree of non-seasonal differencing (d) of X series & 0 \tabularnewline
Degree of seasonal differencing (D) of X series & 1 \tabularnewline
Seasonal Period (s) & 12 \tabularnewline
Box-Cox transformation parameter (lambda) of Y series & -1.7 \tabularnewline
Degree of non-seasonal differencing (d) of Y series & 1 \tabularnewline
Degree of seasonal differencing (D) of Y series & 1 \tabularnewline
k & rho(Y[t],X[t+k]) \tabularnewline
-14 & -0.00431381240300947 \tabularnewline
-13 & 0.111397822504153 \tabularnewline
-12 & -0.0475687178125955 \tabularnewline
-11 & -0.117181358801256 \tabularnewline
-10 & -0.0258154857728156 \tabularnewline
-9 & -0.200918647992180 \tabularnewline
-8 & -0.195718265186021 \tabularnewline
-7 & -0.0599250514734523 \tabularnewline
-6 & -0.229863660149624 \tabularnewline
-5 & -0.205488708237757 \tabularnewline
-4 & -0.32764257167239 \tabularnewline
-3 & -0.230142225957488 \tabularnewline
-2 & -0.0249063662922654 \tabularnewline
-1 & -0.421482615356873 \tabularnewline
0 & -0.223432118665445 \tabularnewline
1 & -0.0479046609271945 \tabularnewline
2 & -0.392007548062422 \tabularnewline
3 & 0.220533792759816 \tabularnewline
4 & 0.061980169537483 \tabularnewline
5 & -0.236049022115555 \tabularnewline
6 & 0.181761626372412 \tabularnewline
7 & -0.113597353913149 \tabularnewline
8 & 0.0380518057770374 \tabularnewline
9 & -0.00686882982049242 \tabularnewline
10 & -0.0726888673777125 \tabularnewline
11 & 0.052332641520823 \tabularnewline
12 & -0.0523534017676355 \tabularnewline
13 & 0.00513184563827432 \tabularnewline
14 & 0.0921411155103819 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=27930&T=1

[TABLE]
[ROW][C]Cross Correlation Function[/C][/ROW]
[ROW][C]Parameter[/C][C]Value[/C][/ROW]
[ROW][C]Box-Cox transformation parameter (lambda) of X series[/C][C]0.5[/C][/ROW]
[ROW][C]Degree of non-seasonal differencing (d) of X series[/C][C]0[/C][/ROW]
[ROW][C]Degree of seasonal differencing (D) of X series[/C][C]1[/C][/ROW]
[ROW][C]Seasonal Period (s)[/C][C]12[/C][/ROW]
[ROW][C]Box-Cox transformation parameter (lambda) of Y series[/C][C]-1.7[/C][/ROW]
[ROW][C]Degree of non-seasonal differencing (d) of Y series[/C][C]1[/C][/ROW]
[ROW][C]Degree of seasonal differencing (D) of Y series[/C][C]1[/C][/ROW]
[ROW][C]k[/C][C]rho(Y[t],X[t+k])[/C][/ROW]
[ROW][C]-14[/C][C]-0.00431381240300947[/C][/ROW]
[ROW][C]-13[/C][C]0.111397822504153[/C][/ROW]
[ROW][C]-12[/C][C]-0.0475687178125955[/C][/ROW]
[ROW][C]-11[/C][C]-0.117181358801256[/C][/ROW]
[ROW][C]-10[/C][C]-0.0258154857728156[/C][/ROW]
[ROW][C]-9[/C][C]-0.200918647992180[/C][/ROW]
[ROW][C]-8[/C][C]-0.195718265186021[/C][/ROW]
[ROW][C]-7[/C][C]-0.0599250514734523[/C][/ROW]
[ROW][C]-6[/C][C]-0.229863660149624[/C][/ROW]
[ROW][C]-5[/C][C]-0.205488708237757[/C][/ROW]
[ROW][C]-4[/C][C]-0.32764257167239[/C][/ROW]
[ROW][C]-3[/C][C]-0.230142225957488[/C][/ROW]
[ROW][C]-2[/C][C]-0.0249063662922654[/C][/ROW]
[ROW][C]-1[/C][C]-0.421482615356873[/C][/ROW]
[ROW][C]0[/C][C]-0.223432118665445[/C][/ROW]
[ROW][C]1[/C][C]-0.0479046609271945[/C][/ROW]
[ROW][C]2[/C][C]-0.392007548062422[/C][/ROW]
[ROW][C]3[/C][C]0.220533792759816[/C][/ROW]
[ROW][C]4[/C][C]0.061980169537483[/C][/ROW]
[ROW][C]5[/C][C]-0.236049022115555[/C][/ROW]
[ROW][C]6[/C][C]0.181761626372412[/C][/ROW]
[ROW][C]7[/C][C]-0.113597353913149[/C][/ROW]
[ROW][C]8[/C][C]0.0380518057770374[/C][/ROW]
[ROW][C]9[/C][C]-0.00686882982049242[/C][/ROW]
[ROW][C]10[/C][C]-0.0726888673777125[/C][/ROW]
[ROW][C]11[/C][C]0.052332641520823[/C][/ROW]
[ROW][C]12[/C][C]-0.0523534017676355[/C][/ROW]
[ROW][C]13[/C][C]0.00513184563827432[/C][/ROW]
[ROW][C]14[/C][C]0.0921411155103819[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=27930&T=1

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

As an alternative you can also use a QR Code:  

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

Cross Correlation Function
ParameterValue
Box-Cox transformation parameter (lambda) of X series0.5
Degree of non-seasonal differencing (d) of X series0
Degree of seasonal differencing (D) of X series1
Seasonal Period (s)12
Box-Cox transformation parameter (lambda) of Y series-1.7
Degree of non-seasonal differencing (d) of Y series1
Degree of seasonal differencing (D) of Y series1
krho(Y[t],X[t+k])
-14-0.00431381240300947
-130.111397822504153
-12-0.0475687178125955
-11-0.117181358801256
-10-0.0258154857728156
-9-0.200918647992180
-8-0.195718265186021
-7-0.0599250514734523
-6-0.229863660149624
-5-0.205488708237757
-4-0.32764257167239
-3-0.230142225957488
-2-0.0249063662922654
-1-0.421482615356873
0-0.223432118665445
1-0.0479046609271945
2-0.392007548062422
30.220533792759816
40.061980169537483
5-0.236049022115555
60.181761626372412
7-0.113597353913149
80.0380518057770374
9-0.00686882982049242
10-0.0726888673777125
110.052332641520823
12-0.0523534017676355
130.00513184563827432
140.0921411155103819



Parameters (Session):
par1 = 0.5 ; par2 = 0 ; par3 = 1 ; par4 = 12 ; par5 = -1.7 ; par6 = 1 ; par7 = 1 ;
Parameters (R input):
par1 = 0.5 ; par2 = 0 ; par3 = 1 ; par4 = 12 ; par5 = -1.7 ; par6 = 1 ; par7 = 1 ;
R code (references can be found in the software module):
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)
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
bitmap(file='test1.png')
(r <- ccf(x,y,main='Cross Correlation Function',ylab='CCF',xlab='Lag (k)'))
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Cross Correlation Function',2,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'Value',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Box-Cox transformation parameter (lambda) of X series',header=TRUE)
a<-table.element(a,par1)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Degree of non-seasonal differencing (d) of X series',header=TRUE)
a<-table.element(a,par2)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Degree of seasonal differencing (D) of X series',header=TRUE)
a<-table.element(a,par3)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Seasonal Period (s)',header=TRUE)
a<-table.element(a,par4)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Box-Cox transformation parameter (lambda) of Y series',header=TRUE)
a<-table.element(a,par5)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Degree of non-seasonal differencing (d) of Y series',header=TRUE)
a<-table.element(a,par6)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Degree of seasonal differencing (D) of Y series',header=TRUE)
a<-table.element(a,par7)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'k',header=TRUE)
a<-table.element(a,'rho(Y[t],X[t+k])',header=TRUE)
a<-table.row.end(a)
mylength <- length(r$acf)
myhalf <- floor((mylength-1)/2)
for (i in 1:mylength) {
a<-table.row.start(a)
a<-table.element(a,i-myhalf-1,header=TRUE)
a<-table.element(a,r$acf[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.tab')