Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_cross.wasp
Title produced by softwareCross Correlation Function
Date of computationWed, 03 Dec 2008 03:38:03 -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/03/t12283007339up7bbd3mf10oeq.htm/, Retrieved Mon, 20 May 2024 22:18:59 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=28607, Retrieved Mon, 20 May 2024 22:18:59 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact191
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F       [Cross Correlation Function] [] [2008-12-03 10:38:03] [ba8414dd214a21fbd6c7bde748ac585f] [Current]
Feedback Forum
2008-12-06 11:28:03 [Carole Thielens] [reply
De student maakte juiste bewerkingen, maar ook hier ontbrak uitleg en interpretatie. Wat is de cross correlation function? Hoe wordt de bijhorende tabel geïnterpreteerd? Wat betekent het als alle lijntjes op de cross correlation function binnen het betrouwbaarheidsinterval liggen?

Aanvulling:

We gaan Yt trachten te voorspellen aan de hand van Xt of de vorige waarden van Xt (Xt-k). Eigenlijk kan gesteld worden dat we zoeken naar een leading indicator. Dit wil zeggen dat de ene variabele een voorspellende kracht heeft en bijgevolg al op voorhand informatie kan geven over het verloop van de andere variabele.

In de bovenstaande tabel zie je dus allemaal correlaties staan, welke eveneens op de cross correlatie function grafiek uitgetekend zijn. Deze waarden geven de correlatie weer tussen Yt en Xt-k, waarbij k gelijk is aan een bepaald aantal periodes naar het verleden of naar de toekomst toe.

we nu kijken naar de cross correlation function grafiek, dan kan duidelijk waargenomen worden dat verscheidene lijntjes binnen het interval liggen. Deze waarden voor k kunnen dus NIET gebruikt worden om Yt te voorspellen.
2008-12-08 21:52:18 [Katja van Hek] [reply
2008-12-08 21:52:38 [Katja van Hek] [reply
  2008-12-08 21:56:57 [Katja van Hek] [reply
Cross correlatie wil nagaan of er een correlatie is tussen x en y, ze wil nagaan of de waarde van y te voorspellen is op basis van een bepaald gegeven van x. De k geeft hier het aantal periodes weer. De grafiek geeft duidelijk aan dat de verkregen waarden binnen de 95% betrouwbaarheidsinterval liggen wat erop duid dat het niet mogelijk is om y te voorspellen op basis van gegevens van x uit het verleden.

Post a new message
Dataseries X:
2.36
1.95
2.16
2.76
2.09
1.49
1.17
1.3
1.26
2.17
2.03
2.18
2.61
2.58
3.86
3.81
2.41
1.47
1.33
1.38
1.57
2.6
2.18
2.36
2.24
2.41
2.51
2.98
1.87
1.9
1.47
1.45
2.71
2.9
2.11
2.18
2.24
2.05
2.42
2.77
1.99
1.47
1.09
0.93
1.32
2.03
2.04
2.78
2.8
3.03
3.11
2.75
2.78
1.76
1.29
1.28
1.43
1.71
1.89
1.84
2.08
2.09
2.36
2.99
2.75
1.58
1.69
1.3
1.97
1.84
1.96
1.86
2.75
2.62
2.41
3.61
2.03
1.45
1.4
1.3
1.58
2.1
2.27
2.54
Dataseries Y:
1.43
1.43
1.43
1.43
1.43
1.43
1.44
1.48
1.48
1.48
1.48
1.48
1.48
1.48
1.48
1.48
1.48
1.48
1.48
1.48
1.48
1.48
1.48
1.48
1.48
1.48
1.48
1.48
1.48
1.48
1.48
1.48
1.48
1.48
1.48
1.48
1.48
1.57
1.58
1.58
1.58
1.58
1.59
1.60
1.60
1.61
1.61
1.61
1.62
1.63
1.63
1.64
1.64
1.64
1.64
1.64
1.65
1.65
1.65
1.65
1.65
1.66
1.66
1.67
1.68
1.68
1.68
1.68
1.69
1.70
1.70
1.71
1.72
1.73
1.74
1.74
1.75
1.75
1.75
1.76
1.79
1.83
1.84
1.85




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=28607&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 series1
Degree of non-seasonal differencing (d) of X series0
Degree of seasonal differencing (D) of X series0
Seasonal Period (s)12
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])
-16-0.049812852593193
-15-0.0658742663193848
-14-0.0718783476884783
-13-0.0703566161413598
-12-0.0780443569385034
-11-0.0518743820310279
-10-0.0366349267484932
-9-0.0384407140853216
-80.0284096566016147
-70.0243509496289714
-60.00258406918766831
-5-0.0260436832209466
-4-0.0735390345496292
-3-0.108117485825005
-2-0.0960865515298792
-1-0.0711061535678669
0-0.0401424931255136
1-0.0256762944448094
2-0.0334731549347247
3-0.0479628430650833
4-0.0316224275138994
5-0.0220793647825508
6-0.021152795012376
7-0.0277303290826935
8-0.050911687899404
9-0.0840096721009544
10-0.0857440721861434
11-0.0923055254596313
12-0.0944857656369184
13-0.0917444779445331
14-0.0885802652955315
15-0.0561763397714263
16-0.0213691391611503

\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) & 12 \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
-16 & -0.049812852593193 \tabularnewline
-15 & -0.0658742663193848 \tabularnewline
-14 & -0.0718783476884783 \tabularnewline
-13 & -0.0703566161413598 \tabularnewline
-12 & -0.0780443569385034 \tabularnewline
-11 & -0.0518743820310279 \tabularnewline
-10 & -0.0366349267484932 \tabularnewline
-9 & -0.0384407140853216 \tabularnewline
-8 & 0.0284096566016147 \tabularnewline
-7 & 0.0243509496289714 \tabularnewline
-6 & 0.00258406918766831 \tabularnewline
-5 & -0.0260436832209466 \tabularnewline
-4 & -0.0735390345496292 \tabularnewline
-3 & -0.108117485825005 \tabularnewline
-2 & -0.0960865515298792 \tabularnewline
-1 & -0.0711061535678669 \tabularnewline
0 & -0.0401424931255136 \tabularnewline
1 & -0.0256762944448094 \tabularnewline
2 & -0.0334731549347247 \tabularnewline
3 & -0.0479628430650833 \tabularnewline
4 & -0.0316224275138994 \tabularnewline
5 & -0.0220793647825508 \tabularnewline
6 & -0.021152795012376 \tabularnewline
7 & -0.0277303290826935 \tabularnewline
8 & -0.050911687899404 \tabularnewline
9 & -0.0840096721009544 \tabularnewline
10 & -0.0857440721861434 \tabularnewline
11 & -0.0923055254596313 \tabularnewline
12 & -0.0944857656369184 \tabularnewline
13 & -0.0917444779445331 \tabularnewline
14 & -0.0885802652955315 \tabularnewline
15 & -0.0561763397714263 \tabularnewline
16 & -0.0213691391611503 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=28607&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]12[/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]-16[/C][C]-0.049812852593193[/C][/ROW]
[ROW][C]-15[/C][C]-0.0658742663193848[/C][/ROW]
[ROW][C]-14[/C][C]-0.0718783476884783[/C][/ROW]
[ROW][C]-13[/C][C]-0.0703566161413598[/C][/ROW]
[ROW][C]-12[/C][C]-0.0780443569385034[/C][/ROW]
[ROW][C]-11[/C][C]-0.0518743820310279[/C][/ROW]
[ROW][C]-10[/C][C]-0.0366349267484932[/C][/ROW]
[ROW][C]-9[/C][C]-0.0384407140853216[/C][/ROW]
[ROW][C]-8[/C][C]0.0284096566016147[/C][/ROW]
[ROW][C]-7[/C][C]0.0243509496289714[/C][/ROW]
[ROW][C]-6[/C][C]0.00258406918766831[/C][/ROW]
[ROW][C]-5[/C][C]-0.0260436832209466[/C][/ROW]
[ROW][C]-4[/C][C]-0.0735390345496292[/C][/ROW]
[ROW][C]-3[/C][C]-0.108117485825005[/C][/ROW]
[ROW][C]-2[/C][C]-0.0960865515298792[/C][/ROW]
[ROW][C]-1[/C][C]-0.0711061535678669[/C][/ROW]
[ROW][C]0[/C][C]-0.0401424931255136[/C][/ROW]
[ROW][C]1[/C][C]-0.0256762944448094[/C][/ROW]
[ROW][C]2[/C][C]-0.0334731549347247[/C][/ROW]
[ROW][C]3[/C][C]-0.0479628430650833[/C][/ROW]
[ROW][C]4[/C][C]-0.0316224275138994[/C][/ROW]
[ROW][C]5[/C][C]-0.0220793647825508[/C][/ROW]
[ROW][C]6[/C][C]-0.021152795012376[/C][/ROW]
[ROW][C]7[/C][C]-0.0277303290826935[/C][/ROW]
[ROW][C]8[/C][C]-0.050911687899404[/C][/ROW]
[ROW][C]9[/C][C]-0.0840096721009544[/C][/ROW]
[ROW][C]10[/C][C]-0.0857440721861434[/C][/ROW]
[ROW][C]11[/C][C]-0.0923055254596313[/C][/ROW]
[ROW][C]12[/C][C]-0.0944857656369184[/C][/ROW]
[ROW][C]13[/C][C]-0.0917444779445331[/C][/ROW]
[ROW][C]14[/C][C]-0.0885802652955315[/C][/ROW]
[ROW][C]15[/C][C]-0.0561763397714263[/C][/ROW]
[ROW][C]16[/C][C]-0.0213691391611503[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=28607&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=28607&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)12
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])
-16-0.049812852593193
-15-0.0658742663193848
-14-0.0718783476884783
-13-0.0703566161413598
-12-0.0780443569385034
-11-0.0518743820310279
-10-0.0366349267484932
-9-0.0384407140853216
-80.0284096566016147
-70.0243509496289714
-60.00258406918766831
-5-0.0260436832209466
-4-0.0735390345496292
-3-0.108117485825005
-2-0.0960865515298792
-1-0.0711061535678669
0-0.0401424931255136
1-0.0256762944448094
2-0.0334731549347247
3-0.0479628430650833
4-0.0316224275138994
5-0.0220793647825508
6-0.021152795012376
7-0.0277303290826935
8-0.050911687899404
9-0.0840096721009544
10-0.0857440721861434
11-0.0923055254596313
12-0.0944857656369184
13-0.0917444779445331
14-0.0885802652955315
15-0.0561763397714263
16-0.0213691391611503



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