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 11:30:50 -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/t1228069982vz58gim4qzd7zez.htm/, Retrieved Sun, 26 May 2024 08:14:36 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=26677, Retrieved Sun, 26 May 2024 08:14:36 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordscross correlation
Estimated Impact142
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F       [Cross Correlation Function] [Q7 cross correlat...] [2008-11-30 18:30:50] [8da7502cfecb272886bc60b3f290b8b8] [Current]
Feedback Forum
2008-12-08 21:35:34 [Evelien Blockx] [reply
Crosscorrelatie geeft de mate waarin een variabele voorspeld kan worden d.m.v. het verleden van een tweede variabele. Zo zou je bijvoorbeeld eventueel een voorspelling kunnen maken voor tijdreeks Y aan de hand van het verleden van tijdreeks X.

K-1 geeft de correlatie tussen Yt en Xt-1 (verleden)

K+1 geeft de correlatie tussen yt en Xt+1 (toekomst)

Je concludeert terecht dat hier niet alle waarden binnen het betrouwbaarheidsinterval vallen. Wat hier bijvoorbeeld opvalt, is dat de waarden die buiten het betrouwbaarheidsinterval vallen allemaal betrekking hebben tot het verleden van X (bv. X-5, X-6, X-7…)

Post a new message
Dataseries X:
1190,8
728,8
995,6
1260,3
994
957,3
975,6
884,9
908,4
1022,8
958,6
825,1
1116,6
724,2
1004,5
1058,9
854,7
943,4
792,4
873,2
1101,4
987,1
1038,8
1060,7
1047,7
840
1044
1097,4
987,5
934
977
881,1
1083,3
1074,7
1182,2
1117,5
1117,4
936,2
1246,3
1175,1
1177,7
1035,8
1091,6
998,7
1247,9
1034,7
1287,7
994,0
1122,8
1017,3
1106,0
1191,8
1030,1
989,4
979,6
1088,0
1389,2
1043,9
1182,1
1109,6
1463,3
1276,2
1082,4
1360,4
1130,2
1019,6
1077,0
958,8
959,6
907,2
880,8
759,6
1137,2
Dataseries Y:
0,9922
0,9778
0,9808
0,9811
1,0014
1,0183
1,0622
1,0773
1,0807
1,0848
1,1582
1,1663
1,1372
1,1139
1,1222
1,1692
1,1702
1,2286
1,2613
1,2646
1,2262
1,1985
1,2007
1,2138
1,2266
1,2176
1,2218
1,249
1,2991
1,3408
1,3119
1,3014
1,3201
1,2938
1,2694
1,2165
1,2037
1,2292
1,2256
1,2015
1,1786
1,1856
1,2103
1,1938
1,202
1,2271
1,277
1,265
1,2684
1,2811
1,2727
1,2611
1,2881
1,3213
1,2999
1,3074
1,3242
1,3516
1,3511
1,3419
1,3716
1,3622
1,3896
1,4227
1,4684
1,457
1,4718
1,4748
1,5527
1,575
1,5557
1,5553
1,577




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=26677&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 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])
-150.148107642741018
-140.180908617141240
-130.184034933195046
-120.267784743620684
-110.281600657556807
-100.283754689661188
-90.355516559398791
-80.385472103048106
-70.342689370160579
-60.315392373327925
-50.271162230013831
-40.237829213164103
-30.1975753497993
-20.152263030123838
-10.0720588809899811
00.0995412199156855
10.124932451597005
20.105492425691259
30.132797217105050
40.203767766275709
50.197734846327819
60.190631906986203
70.184649618617458
80.176683172552138
90.176820380884912
100.190984165506982
110.162390481190403
120.132433674634134
130.147562214668344
140.116005831867245
150.110849771663263

\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
-15 & 0.148107642741018 \tabularnewline
-14 & 0.180908617141240 \tabularnewline
-13 & 0.184034933195046 \tabularnewline
-12 & 0.267784743620684 \tabularnewline
-11 & 0.281600657556807 \tabularnewline
-10 & 0.283754689661188 \tabularnewline
-9 & 0.355516559398791 \tabularnewline
-8 & 0.385472103048106 \tabularnewline
-7 & 0.342689370160579 \tabularnewline
-6 & 0.315392373327925 \tabularnewline
-5 & 0.271162230013831 \tabularnewline
-4 & 0.237829213164103 \tabularnewline
-3 & 0.1975753497993 \tabularnewline
-2 & 0.152263030123838 \tabularnewline
-1 & 0.0720588809899811 \tabularnewline
0 & 0.0995412199156855 \tabularnewline
1 & 0.124932451597005 \tabularnewline
2 & 0.105492425691259 \tabularnewline
3 & 0.132797217105050 \tabularnewline
4 & 0.203767766275709 \tabularnewline
5 & 0.197734846327819 \tabularnewline
6 & 0.190631906986203 \tabularnewline
7 & 0.184649618617458 \tabularnewline
8 & 0.176683172552138 \tabularnewline
9 & 0.176820380884912 \tabularnewline
10 & 0.190984165506982 \tabularnewline
11 & 0.162390481190403 \tabularnewline
12 & 0.132433674634134 \tabularnewline
13 & 0.147562214668344 \tabularnewline
14 & 0.116005831867245 \tabularnewline
15 & 0.110849771663263 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=26677&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]-15[/C][C]0.148107642741018[/C][/ROW]
[ROW][C]-14[/C][C]0.180908617141240[/C][/ROW]
[ROW][C]-13[/C][C]0.184034933195046[/C][/ROW]
[ROW][C]-12[/C][C]0.267784743620684[/C][/ROW]
[ROW][C]-11[/C][C]0.281600657556807[/C][/ROW]
[ROW][C]-10[/C][C]0.283754689661188[/C][/ROW]
[ROW][C]-9[/C][C]0.355516559398791[/C][/ROW]
[ROW][C]-8[/C][C]0.385472103048106[/C][/ROW]
[ROW][C]-7[/C][C]0.342689370160579[/C][/ROW]
[ROW][C]-6[/C][C]0.315392373327925[/C][/ROW]
[ROW][C]-5[/C][C]0.271162230013831[/C][/ROW]
[ROW][C]-4[/C][C]0.237829213164103[/C][/ROW]
[ROW][C]-3[/C][C]0.1975753497993[/C][/ROW]
[ROW][C]-2[/C][C]0.152263030123838[/C][/ROW]
[ROW][C]-1[/C][C]0.0720588809899811[/C][/ROW]
[ROW][C]0[/C][C]0.0995412199156855[/C][/ROW]
[ROW][C]1[/C][C]0.124932451597005[/C][/ROW]
[ROW][C]2[/C][C]0.105492425691259[/C][/ROW]
[ROW][C]3[/C][C]0.132797217105050[/C][/ROW]
[ROW][C]4[/C][C]0.203767766275709[/C][/ROW]
[ROW][C]5[/C][C]0.197734846327819[/C][/ROW]
[ROW][C]6[/C][C]0.190631906986203[/C][/ROW]
[ROW][C]7[/C][C]0.184649618617458[/C][/ROW]
[ROW][C]8[/C][C]0.176683172552138[/C][/ROW]
[ROW][C]9[/C][C]0.176820380884912[/C][/ROW]
[ROW][C]10[/C][C]0.190984165506982[/C][/ROW]
[ROW][C]11[/C][C]0.162390481190403[/C][/ROW]
[ROW][C]12[/C][C]0.132433674634134[/C][/ROW]
[ROW][C]13[/C][C]0.147562214668344[/C][/ROW]
[ROW][C]14[/C][C]0.116005831867245[/C][/ROW]
[ROW][C]15[/C][C]0.110849771663263[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=26677&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=26677&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])
-150.148107642741018
-140.180908617141240
-130.184034933195046
-120.267784743620684
-110.281600657556807
-100.283754689661188
-90.355516559398791
-80.385472103048106
-70.342689370160579
-60.315392373327925
-50.271162230013831
-40.237829213164103
-30.1975753497993
-20.152263030123838
-10.0720588809899811
00.0995412199156855
10.124932451597005
20.105492425691259
30.132797217105050
40.203767766275709
50.197734846327819
60.190631906986203
70.184649618617458
80.176683172552138
90.176820380884912
100.190984165506982
110.162390481190403
120.132433674634134
130.147562214668344
140.116005831867245
150.110849771663263



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')