Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_cross.wasp
Title produced by softwareCross Correlation Function
Date of computationSun, 30 Nov 2008 05:38:52 -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/Nov/30/t1228049142ahhpfawydnemn3s.htm/, Retrieved Sun, 19 May 2024 06:42:18 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=26477, Retrieved Sun, 19 May 2024 06:42:18 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact178
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [Univariate Data Series] [Airline data] [2007-10-18 09:58:47] [42daae401fd3def69a25014f2252b4c2]
F RMPD    [Cross Correlation Function] [Non Stationary Ti...] [2008-11-30 12:38:52] [dafd615cb3e0decc017580d68ecea30a] [Current]
Feedback Forum
2008-12-07 11:46:50 [Dana Molenberghs] [reply
Het verschil tussen de autocorrelatie functie en de crosscorrelatiefunctie is het volgende: bij de autocorrelatie wordt berekend in welke mate de variabele Yt veranderd met behulp van zijn eigen verleden.
bv: P1 = P(Yt, Yt-1)

Bij de crosscorrelatie gaat het om de correlatie tussen Yt van de ene datareeks en een andere variabele van een andere datareeks.
bv: P1= P(Xt, Yt)
2008-12-08 21:53:00 [Jeroen Michel] [reply
Deze functie dient inderdaad om aan de hand van een andere variabele een voorspelling te kunnen maken over de toekomst.

De tijdreeks maakt met andere woorden een sprong in de toekomst (lags). Per lag is er een verschuiving van 1 periode.

Bij k=0 een hoge correlatiewaarde van 66% vinden tussen de 2 reeksen is er een hoge mate van voorspelbaarheid.

Post a new message
Dataseries X:
124
124
123
123
122
121
121
119
118
118
118
118
118
118
117
115
113
112
112
112
112
111
111
110
108
107
105
105
106
106
106
105
105
105
105
105
105
105
105
106
107
106
105
104
103
102
101
99
98
97
97
96
96
96
96
96
96
96
97
98
Dataseries Y:
132,7
132,7
132,8
132,4
131,5
131
130,7
130,1
129,1
128
127
126
125
123,7
122,1
120,2
118,5
117,2
116,2
115,1
113,8
112,7
111,8
111,2
110,6
109,7
108,6
107,8
107,5
107,5
107,4
107,2
107,1
107,2
107,5
107,9
108,4
108,8
109
109
109
108,8
108,4
108,1
107,8
107,3
106,6
105,9
105,4
105,4
105,6
105,6
105,6
105,7
105,6
105,4
105,4
105,5
105,7
105,8




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=26477&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]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=26477&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=26477&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'George Udny Yule' @ 72.249.76.132







Cross Correlation Function
ParameterValue
Box-Cox transformation parameter (lambda) of X series1
Degree of non-seasonal differencing (d) of X series0
Degree of seasonal differencing (D) of X series0
Seasonal Period (s)1
Box-Cox transformation parameter (lambda) of Y series1
Degree of non-seasonal differencing (d) of Y series0
Degree of seasonal differencing (D) of Y series0
krho(Y[t],X[t+k])
-140.0698610282762678
-130.122554019005124
-120.181268474642014
-110.24306004678852
-100.307556295028818
-90.37288363715998
-80.441058769063237
-70.510044303723144
-60.57835737652115
-50.64472030991964
-40.70958486034892
-30.774102834280141
-20.836482724342752
-10.892852529621144
00.9428173943041
10.908927126938492
20.870234792174433
30.83103104154309
40.787666648673878
50.744311566815062
60.701734816454867
70.656138884760852
80.6153395028295
90.575894355632346
100.533945581195497
110.489179363983398
120.442344033350062
130.395144883606825
140.34857853771825

\begin{tabular}{lllllllll}
\hline
Cross Correlation Function \tabularnewline
Parameter & Value \tabularnewline
Box-Cox transformation parameter (lambda) of X series & 1 \tabularnewline
Degree of non-seasonal differencing (d) of X series & 0 \tabularnewline
Degree of seasonal differencing (D) of X series & 0 \tabularnewline
Seasonal Period (s) & 1 \tabularnewline
Box-Cox transformation parameter (lambda) of Y series & 1 \tabularnewline
Degree of non-seasonal differencing (d) of Y series & 0 \tabularnewline
Degree of seasonal differencing (D) of Y series & 0 \tabularnewline
k & rho(Y[t],X[t+k]) \tabularnewline
-14 & 0.0698610282762678 \tabularnewline
-13 & 0.122554019005124 \tabularnewline
-12 & 0.181268474642014 \tabularnewline
-11 & 0.24306004678852 \tabularnewline
-10 & 0.307556295028818 \tabularnewline
-9 & 0.37288363715998 \tabularnewline
-8 & 0.441058769063237 \tabularnewline
-7 & 0.510044303723144 \tabularnewline
-6 & 0.57835737652115 \tabularnewline
-5 & 0.64472030991964 \tabularnewline
-4 & 0.70958486034892 \tabularnewline
-3 & 0.774102834280141 \tabularnewline
-2 & 0.836482724342752 \tabularnewline
-1 & 0.892852529621144 \tabularnewline
0 & 0.9428173943041 \tabularnewline
1 & 0.908927126938492 \tabularnewline
2 & 0.870234792174433 \tabularnewline
3 & 0.83103104154309 \tabularnewline
4 & 0.787666648673878 \tabularnewline
5 & 0.744311566815062 \tabularnewline
6 & 0.701734816454867 \tabularnewline
7 & 0.656138884760852 \tabularnewline
8 & 0.6153395028295 \tabularnewline
9 & 0.575894355632346 \tabularnewline
10 & 0.533945581195497 \tabularnewline
11 & 0.489179363983398 \tabularnewline
12 & 0.442344033350062 \tabularnewline
13 & 0.395144883606825 \tabularnewline
14 & 0.34857853771825 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=26477&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]1[/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]0[/C][/ROW]
[ROW][C]Seasonal Period (s)[/C][C]1[/C][/ROW]
[ROW][C]Box-Cox transformation parameter (lambda) of Y series[/C][C]1[/C][/ROW]
[ROW][C]Degree of non-seasonal differencing (d) of Y series[/C][C]0[/C][/ROW]
[ROW][C]Degree of seasonal differencing (D) of Y series[/C][C]0[/C][/ROW]
[ROW][C]k[/C][C]rho(Y[t],X[t+k])[/C][/ROW]
[ROW][C]-14[/C][C]0.0698610282762678[/C][/ROW]
[ROW][C]-13[/C][C]0.122554019005124[/C][/ROW]
[ROW][C]-12[/C][C]0.181268474642014[/C][/ROW]
[ROW][C]-11[/C][C]0.24306004678852[/C][/ROW]
[ROW][C]-10[/C][C]0.307556295028818[/C][/ROW]
[ROW][C]-9[/C][C]0.37288363715998[/C][/ROW]
[ROW][C]-8[/C][C]0.441058769063237[/C][/ROW]
[ROW][C]-7[/C][C]0.510044303723144[/C][/ROW]
[ROW][C]-6[/C][C]0.57835737652115[/C][/ROW]
[ROW][C]-5[/C][C]0.64472030991964[/C][/ROW]
[ROW][C]-4[/C][C]0.70958486034892[/C][/ROW]
[ROW][C]-3[/C][C]0.774102834280141[/C][/ROW]
[ROW][C]-2[/C][C]0.836482724342752[/C][/ROW]
[ROW][C]-1[/C][C]0.892852529621144[/C][/ROW]
[ROW][C]0[/C][C]0.9428173943041[/C][/ROW]
[ROW][C]1[/C][C]0.908927126938492[/C][/ROW]
[ROW][C]2[/C][C]0.870234792174433[/C][/ROW]
[ROW][C]3[/C][C]0.83103104154309[/C][/ROW]
[ROW][C]4[/C][C]0.787666648673878[/C][/ROW]
[ROW][C]5[/C][C]0.744311566815062[/C][/ROW]
[ROW][C]6[/C][C]0.701734816454867[/C][/ROW]
[ROW][C]7[/C][C]0.656138884760852[/C][/ROW]
[ROW][C]8[/C][C]0.6153395028295[/C][/ROW]
[ROW][C]9[/C][C]0.575894355632346[/C][/ROW]
[ROW][C]10[/C][C]0.533945581195497[/C][/ROW]
[ROW][C]11[/C][C]0.489179363983398[/C][/ROW]
[ROW][C]12[/C][C]0.442344033350062[/C][/ROW]
[ROW][C]13[/C][C]0.395144883606825[/C][/ROW]
[ROW][C]14[/C][C]0.34857853771825[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=26477&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=26477&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 series1
Degree of non-seasonal differencing (d) of X series0
Degree of seasonal differencing (D) of X series0
Seasonal Period (s)1
Box-Cox transformation parameter (lambda) of Y series1
Degree of non-seasonal differencing (d) of Y series0
Degree of seasonal differencing (D) of Y series0
krho(Y[t],X[t+k])
-140.0698610282762678
-130.122554019005124
-120.181268474642014
-110.24306004678852
-100.307556295028818
-90.37288363715998
-80.441058769063237
-70.510044303723144
-60.57835737652115
-50.64472030991964
-40.70958486034892
-30.774102834280141
-20.836482724342752
-10.892852529621144
00.9428173943041
10.908927126938492
20.870234792174433
30.83103104154309
40.787666648673878
50.744311566815062
60.701734816454867
70.656138884760852
80.6153395028295
90.575894355632346
100.533945581195497
110.489179363983398
120.442344033350062
130.395144883606825
140.34857853771825



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