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 computationMon, 01 Dec 2008 13:34:09 -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/01/t1228163700peqelyk6oc4zpk1.htm/, Retrieved Sun, 05 May 2024 17:05:16 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=27351, Retrieved Sun, 05 May 2024 17:05:16 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact218
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] [Q7 - zonder trans...] [2008-12-01 20:04:13] [299afd6311e4c20059ea2f05c8dd029d]
F           [Cross Correlation Function] [Q9] [2008-12-01 20:34:09] [5e2b1e7aa808f9f0d23fd35605d4968f] [Current]
-   P         [Cross Correlation Function] [Q9 Cross Correlat...] [2008-12-07 11:15:58] [7d3039e6253bb5fb3b26df1537d500b4]
-   P         [Cross Correlation Function] [Verbetering Q9] [2008-12-08 19:45:22] [299afd6311e4c20059ea2f05c8dd029d]
Feedback Forum
2008-12-07 11:20:25 [Stéphanie Claes] [reply
Zie Q5: Zo kan je de lambda berekenen. Door deze in te vullen ga je de tijdreeks wederom transformeren en zo de reeks nog meer stationair maken.

Standard deviation tijdreeks 1:
http://www.freestatistics.org/blog/index.php?v=date/2008/Dec/06/t1228590594eza5whi3fxnnssn.htm

Standard deviation tijdreeks 2:
http://www.freestatistics.org/blog/index.php?v=date/2008/Dec/06/t1228591165zet9jnjfay7cyap.htm

Voor beide tijdreeksen moeten we (d=0, D=1) instellen, de lambda voor tijdreeks X bedraagt -0.0730925427405633 (we ronden dit af naar -0.1) en voor Y bedraagt de lambda -0.289908070420605 (-0.3).

=> http://www.freestatistics.org/blog/index.php?v=date/2008/Dec/07/t1228648592mezs8wycmn4j1c6.htm

De cross correlatie is van strikt positief geëvalueerd naar een zeer random correlatie. We zien duidelijk dat er zowel significante positieve als negatieve correlatie is. De grafiek is dus helemaal anders, het verband is weg, dit komt omdat we door het differentieren de tijdreeks stationair maken en dus de trend verwijderen. Deze grafiek heeft minder kans om een nonsenscorrelatie te zijn dan de grafiek bij Q7.

Post a new message
Dataseries X:
12192.5
11268.8
9097.4
12639.8
13040.1
11687.3
11191.7
11391.9
11793.1
13933.2
12778.1
11810.3
13698.4
11956.6
10723.8
13938.9
13979.8
13807.4
12973.9
12509.8
12934.1
14908.3
13772.1
13012.6
14049.9
11816.5
11593.2
14466.2
13615.9
14733.9
13880.7
13527.5
13584
16170.2
13260.6
14741.9
15486.5
13154.5
12621.2
15031.6
15452.4
15428
13105.9
14716.8
14180
16202.2
14392.4
15140.6
15960.1
14351.3
13230.2
15202.1
17157.3
16159.1
13405.7
17224.7
17338.4
17370.6
18817.8
16593.2
17979.5
Dataseries Y:
10772.8
9987.7
8638.7
11063.7
11855.7
10684.5
11337.4
10478
11123.9
12909.3
11339.9
10462.2
12733.5
10519.2
10414.9
12476.8
12384.6
12266.7
12919.9
11497.3
12142
13919.4
12656.8
12034.1
13199.7
10881.3
11301.2
13643.9
12517
13981.1
14275.7
13435
13565.7
16216.3
12970
14079.9
14235
12213.4
12581
14130.4
14210.8
14378.5
13142.8
13714.7
13621.9
15379.8
13306.3
14391.2
14909.9
14025.4
12951.2
14344.3
16213.3
15544.5
14750.6
17292.7
17568.5
17930.8
18644.7
16694.8
17242.8




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 3 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=27351&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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=27351&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=27351&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 time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001







Cross Correlation Function
ParameterValue
Box-Cox transformation parameter (lambda) of X series1
Degree of non-seasonal differencing (d) of X series2
Degree of seasonal differencing (D) of X series1
Seasonal Period (s)1
Box-Cox transformation parameter (lambda) of Y series1
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.224481386790857
-130.496572244453708
-12-0.351334747399717
-11-0.112399539711409
-100.326985881454151
-9-0.131612218976325
-8-0.200536206963466
-70.374687875415903
-6-0.251462279412266
-5-0.0302884317048065
-40.244006850558887
-3-0.212571838823455
-2-0.241971916695237
-10.818391778583681
0-0.735076083743134
10.0186016595009388
20.405053245349788
3-0.261037667501592
4-0.103711091708675
50.345325846198266
6-0.309767287108635
70.0872034124617518
80.109074907138007
9-0.142991211354845
10-0.0730071128159984
110.390648838664209
12-0.37461386064168
130.0317571507636805
140.188403297544040

\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 & 2 \tabularnewline
Degree of seasonal differencing (D) of X series & 1 \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 & 1 \tabularnewline
Degree of seasonal differencing (D) of Y series & 1 \tabularnewline
k & rho(Y[t],X[t+k]) \tabularnewline
-14 & -0.224481386790857 \tabularnewline
-13 & 0.496572244453708 \tabularnewline
-12 & -0.351334747399717 \tabularnewline
-11 & -0.112399539711409 \tabularnewline
-10 & 0.326985881454151 \tabularnewline
-9 & -0.131612218976325 \tabularnewline
-8 & -0.200536206963466 \tabularnewline
-7 & 0.374687875415903 \tabularnewline
-6 & -0.251462279412266 \tabularnewline
-5 & -0.0302884317048065 \tabularnewline
-4 & 0.244006850558887 \tabularnewline
-3 & -0.212571838823455 \tabularnewline
-2 & -0.241971916695237 \tabularnewline
-1 & 0.818391778583681 \tabularnewline
0 & -0.735076083743134 \tabularnewline
1 & 0.0186016595009388 \tabularnewline
2 & 0.405053245349788 \tabularnewline
3 & -0.261037667501592 \tabularnewline
4 & -0.103711091708675 \tabularnewline
5 & 0.345325846198266 \tabularnewline
6 & -0.309767287108635 \tabularnewline
7 & 0.0872034124617518 \tabularnewline
8 & 0.109074907138007 \tabularnewline
9 & -0.142991211354845 \tabularnewline
10 & -0.0730071128159984 \tabularnewline
11 & 0.390648838664209 \tabularnewline
12 & -0.37461386064168 \tabularnewline
13 & 0.0317571507636805 \tabularnewline
14 & 0.188403297544040 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=27351&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]2[/C][/ROW]
[ROW][C]Degree of seasonal differencing (D) of X series[/C][C]1[/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]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.224481386790857[/C][/ROW]
[ROW][C]-13[/C][C]0.496572244453708[/C][/ROW]
[ROW][C]-12[/C][C]-0.351334747399717[/C][/ROW]
[ROW][C]-11[/C][C]-0.112399539711409[/C][/ROW]
[ROW][C]-10[/C][C]0.326985881454151[/C][/ROW]
[ROW][C]-9[/C][C]-0.131612218976325[/C][/ROW]
[ROW][C]-8[/C][C]-0.200536206963466[/C][/ROW]
[ROW][C]-7[/C][C]0.374687875415903[/C][/ROW]
[ROW][C]-6[/C][C]-0.251462279412266[/C][/ROW]
[ROW][C]-5[/C][C]-0.0302884317048065[/C][/ROW]
[ROW][C]-4[/C][C]0.244006850558887[/C][/ROW]
[ROW][C]-3[/C][C]-0.212571838823455[/C][/ROW]
[ROW][C]-2[/C][C]-0.241971916695237[/C][/ROW]
[ROW][C]-1[/C][C]0.818391778583681[/C][/ROW]
[ROW][C]0[/C][C]-0.735076083743134[/C][/ROW]
[ROW][C]1[/C][C]0.0186016595009388[/C][/ROW]
[ROW][C]2[/C][C]0.405053245349788[/C][/ROW]
[ROW][C]3[/C][C]-0.261037667501592[/C][/ROW]
[ROW][C]4[/C][C]-0.103711091708675[/C][/ROW]
[ROW][C]5[/C][C]0.345325846198266[/C][/ROW]
[ROW][C]6[/C][C]-0.309767287108635[/C][/ROW]
[ROW][C]7[/C][C]0.0872034124617518[/C][/ROW]
[ROW][C]8[/C][C]0.109074907138007[/C][/ROW]
[ROW][C]9[/C][C]-0.142991211354845[/C][/ROW]
[ROW][C]10[/C][C]-0.0730071128159984[/C][/ROW]
[ROW][C]11[/C][C]0.390648838664209[/C][/ROW]
[ROW][C]12[/C][C]-0.37461386064168[/C][/ROW]
[ROW][C]13[/C][C]0.0317571507636805[/C][/ROW]
[ROW][C]14[/C][C]0.188403297544040[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=27351&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=27351&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 series2
Degree of seasonal differencing (D) of X series1
Seasonal Period (s)1
Box-Cox transformation parameter (lambda) of Y series1
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.224481386790857
-130.496572244453708
-12-0.351334747399717
-11-0.112399539711409
-100.326985881454151
-9-0.131612218976325
-8-0.200536206963466
-70.374687875415903
-6-0.251462279412266
-5-0.0302884317048065
-40.244006850558887
-3-0.212571838823455
-2-0.241971916695237
-10.818391778583681
0-0.735076083743134
10.0186016595009388
20.405053245349788
3-0.261037667501592
4-0.103711091708675
50.345325846198266
6-0.309767287108635
70.0872034124617518
80.109074907138007
9-0.142991211354845
10-0.0730071128159984
110.390648838664209
12-0.37461386064168
130.0317571507636805
140.188403297544040



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