Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_cross.wasp
Title produced by softwareCross Correlation Function
Date of computationThu, 26 Oct 2023 11:54:59 +0200
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2023/Oct/26/t1698314424jsp4qgmtyc7wvvo.htm/, Retrieved Fri, 18 Sep 2026 09:34:39 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=319974, Retrieved Fri, 18 Sep 2026 09:34:39 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact398
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Cross Correlation Function] [] [2023-10-26 09:54:59] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
1
0
0
1
4
0
12
0
1
2
13
9
0
47
39
0
40
54
69
265
126
102
121
219
204
235
255
302
294
200
295
325
212
402
424
331
390
370
345
365
500
1515
839
727
992
832
1068
724
709
778
493
401
388
631
936
577
377
701
386
229
376
359
221
343
330
266
211
265
137
156
219
236
139
107
159
426
129
92
64
88
51
64
76
115
76
57
59
37
68
38
35
53
61
72
4
45
31
21
20
18
6
8
16
7
12
45
8
18
13
7
14
13
6
5
4
8
5
9
9
23
2
23
11
4
12
9
11
18
4
7
4
23
24
22
17
10
32
13
15
32
20
10
6
36
17
7
19
24
12
11
37
13
85
38
44
53
46
45
50
69
98
174
68
56
33
37
91
66
196
66
56
186
48
129
79
153
61
147
85
162
90
125
142
40
51
214
89
92
97
231
138
102
306
84
196
211
159
255
207
357
250
224
248
267
395
188
323
231
319
321
245
430
387
363
415
442
466
605
364
517
424
611
502
617
1011
814
823
808
1084
1186
998
1251
1284
1031
1263
1166
1054
785
847
1020
939
700
667
863
762
397
546
748
298
435
563
492
317
539
265
230
358
385
467
427
377
453
330
372
415
329
341
318
250
219
257
307
205
243
299
303
254
268
162
263
457
298
222
214
218
303
304
249
429
264
327
421
481
576
522
766
725
961
927
918
1025
1296
735
765
1545
1718
1622
1753
3394
4961
6110
5325
7832
6503
8227
4843
6886
4926
3052
3553
3913
3491
3232
2946
2117
1996
2485
2598
2357
1905
1370
1369
928
1331
1463
1247
1411
1244
1006
871
1006
1314
1019
785
1020
829
543
999
862
919
1076
786
820
711
638
896
753
978
679
686
557
540
638
773
729
612
681
357
Dataseries Y:
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
1
0
0
1
2
1
2
10
3
14
10
8
17
14
13
22
17
21
16
36
25
28
24
33
14
31
41
38
42
44
41
39
77
43
39
25
220
49
24
15
57
31
42
33
21
17
16
20
36
28
26
17
12
9
21
9
9
12
15
10
4
14
10
12
9
12
4
-2
9
16
8
6
6
1
-2
8
1
5
6
8
1
4
8
4
8
2
0
1
0
3
1
4
0
1
0
2
3
6
1
3
4
1
0
1
2
0
2
1
0
0
1
-4
5
1
2
0
0
0
2
1
3
1
0
0
0
1
9
0
1
0
0
0
0
-1
0
0
0
0
0
0
5
4
0
0
0
1
1
0
0
0
0
0
1
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
3
0
0
2
1
0
3
1
1
3
0
0
0
0
2
3
0
5
0
0
1
1
2
-5
9
0
0
1
5
1
4
3
2
1
3
5
3
3
8
3
0
13
3
3
7
4
0
3
5
6
6
6
5
2
2
5
8
3
7
5
2
1
15
2
0
7
6
1
5
11
11
4
8
4
1
0
5
5
3
7
7
2
1
16
5
6
6
13
0
0
-2
5
15
3
3
1
2
8
6
3
6
5
4
0
13
13
8
2
6
4
1
8
13
11
11
4
7
6
17
17
8
20
9
8
8
45
63
28
48
59
13
8
92
60
50
52
77
23
7
89
54
47
47
78
15
10
101
94
74
35
53
12
1
65
42
52
19
66
17
0
32
56
46
27
26
1
1
44
56
34
29
13
6
0
14




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time0 seconds
R ServerBig Analytics Cloud Computing Center

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input view raw input (R code)  \tabularnewline
Raw Outputview raw output of R engine  \tabularnewline
Computing time0 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=319974&T=0

[TABLE]
[ROW]
Summary of computational transaction[/C][/ROW] [ROW]Raw Input[/C] view raw input (R code) [/C][/ROW] [ROW]Raw Output[/C]view raw output of R engine [/C][/ROW] [ROW]Computing time[/C]0 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=319974&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=319974&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 Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time0 seconds
R ServerBig Analytics Cloud Computing Center







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])
-220.452892671857367
-210.451210357123697
-200.50534560512523
-190.490263604640288
-180.480254189145358
-170.476294634251547
-160.492528664996054
-150.490525346358977
-140.499174083182684
-130.531504898564182
-120.500871457036129
-110.476229111656654
-100.460093178718975
-90.467068792761659
-80.424748526565041
-70.407550767322113
-60.419630498641362
-50.394739050386485
-40.331845423115624
-30.306535628353887
-20.298190699677153
-10.264756953151722
00.245413608173256
10.243289242627615
20.235271354601554
30.191513368201674
40.166869602100989
50.154284120350016
60.134032581771784
70.12547245890537
80.127241243650577
90.114866045261243
100.0843359364204255
110.0712450431111733
120.0622546774456753
130.0442803400877107
140.0390509186938879
150.0517217464505859
160.041203473159116
170.0159215369209567
180.00627446445099098
190.00202434547259325
20-0.00701247835819204
21-0.0204052319567396
22-0.0154657207150843

\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
-22 & 0.452892671857367 \tabularnewline
-21 & 0.451210357123697 \tabularnewline
-20 & 0.50534560512523 \tabularnewline
-19 & 0.490263604640288 \tabularnewline
-18 & 0.480254189145358 \tabularnewline
-17 & 0.476294634251547 \tabularnewline
-16 & 0.492528664996054 \tabularnewline
-15 & 0.490525346358977 \tabularnewline
-14 & 0.499174083182684 \tabularnewline
-13 & 0.531504898564182 \tabularnewline
-12 & 0.500871457036129 \tabularnewline
-11 & 0.476229111656654 \tabularnewline
-10 & 0.460093178718975 \tabularnewline
-9 & 0.467068792761659 \tabularnewline
-8 & 0.424748526565041 \tabularnewline
-7 & 0.407550767322113 \tabularnewline
-6 & 0.419630498641362 \tabularnewline
-5 & 0.394739050386485 \tabularnewline
-4 & 0.331845423115624 \tabularnewline
-3 & 0.306535628353887 \tabularnewline
-2 & 0.298190699677153 \tabularnewline
-1 & 0.264756953151722 \tabularnewline
0 & 0.245413608173256 \tabularnewline
1 & 0.243289242627615 \tabularnewline
2 & 0.235271354601554 \tabularnewline
3 & 0.191513368201674 \tabularnewline
4 & 0.166869602100989 \tabularnewline
5 & 0.154284120350016 \tabularnewline
6 & 0.134032581771784 \tabularnewline
7 & 0.12547245890537 \tabularnewline
8 & 0.127241243650577 \tabularnewline
9 & 0.114866045261243 \tabularnewline
10 & 0.0843359364204255 \tabularnewline
11 & 0.0712450431111733 \tabularnewline
12 & 0.0622546774456753 \tabularnewline
13 & 0.0442803400877107 \tabularnewline
14 & 0.0390509186938879 \tabularnewline
15 & 0.0517217464505859 \tabularnewline
16 & 0.041203473159116 \tabularnewline
17 & 0.0159215369209567 \tabularnewline
18 & 0.00627446445099098 \tabularnewline
19 & 0.00202434547259325 \tabularnewline
20 & -0.00701247835819204 \tabularnewline
21 & -0.0204052319567396 \tabularnewline
22 & -0.0154657207150843 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=319974&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]-22[/C][C]0.452892671857367[/C][/ROW]
[ROW][C]-21[/C][C]0.451210357123697[/C][/ROW]
[ROW][C]-20[/C][C]0.50534560512523[/C][/ROW]
[ROW][C]-19[/C][C]0.490263604640288[/C][/ROW]
[ROW][C]-18[/C][C]0.480254189145358[/C][/ROW]
[ROW][C]-17[/C][C]0.476294634251547[/C][/ROW]
[ROW][C]-16[/C][C]0.492528664996054[/C][/ROW]
[ROW][C]-15[/C][C]0.490525346358977[/C][/ROW]
[ROW][C]-14[/C][C]0.499174083182684[/C][/ROW]
[ROW][C]-13[/C][C]0.531504898564182[/C][/ROW]
[ROW][C]-12[/C][C]0.500871457036129[/C][/ROW]
[ROW][C]-11[/C][C]0.476229111656654[/C][/ROW]
[ROW][C]-10[/C][C]0.460093178718975[/C][/ROW]
[ROW][C]-9[/C][C]0.467068792761659[/C][/ROW]
[ROW][C]-8[/C][C]0.424748526565041[/C][/ROW]
[ROW][C]-7[/C][C]0.407550767322113[/C][/ROW]
[ROW][C]-6[/C][C]0.419630498641362[/C][/ROW]
[ROW][C]-5[/C][C]0.394739050386485[/C][/ROW]
[ROW][C]-4[/C][C]0.331845423115624[/C][/ROW]
[ROW][C]-3[/C][C]0.306535628353887[/C][/ROW]
[ROW][C]-2[/C][C]0.298190699677153[/C][/ROW]
[ROW][C]-1[/C][C]0.264756953151722[/C][/ROW]
[ROW][C]0[/C][C]0.245413608173256[/C][/ROW]
[ROW][C]1[/C][C]0.243289242627615[/C][/ROW]
[ROW][C]2[/C][C]0.235271354601554[/C][/ROW]
[ROW][C]3[/C][C]0.191513368201674[/C][/ROW]
[ROW][C]4[/C][C]0.166869602100989[/C][/ROW]
[ROW][C]5[/C][C]0.154284120350016[/C][/ROW]
[ROW][C]6[/C][C]0.134032581771784[/C][/ROW]
[ROW][C]7[/C][C]0.12547245890537[/C][/ROW]
[ROW][C]8[/C][C]0.127241243650577[/C][/ROW]
[ROW][C]9[/C][C]0.114866045261243[/C][/ROW]
[ROW][C]10[/C][C]0.0843359364204255[/C][/ROW]
[ROW][C]11[/C][C]0.0712450431111733[/C][/ROW]
[ROW][C]12[/C][C]0.0622546774456753[/C][/ROW]
[ROW][C]13[/C][C]0.0442803400877107[/C][/ROW]
[ROW][C]14[/C][C]0.0390509186938879[/C][/ROW]
[ROW][C]15[/C][C]0.0517217464505859[/C][/ROW]
[ROW][C]16[/C][C]0.041203473159116[/C][/ROW]
[ROW][C]17[/C][C]0.0159215369209567[/C][/ROW]
[ROW][C]18[/C][C]0.00627446445099098[/C][/ROW]
[ROW][C]19[/C][C]0.00202434547259325[/C][/ROW]
[ROW][C]20[/C][C]-0.00701247835819204[/C][/ROW]
[ROW][C]21[/C][C]-0.0204052319567396[/C][/ROW]
[ROW][C]22[/C][C]-0.0154657207150843[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=319974&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=319974&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])
-220.452892671857367
-210.451210357123697
-200.50534560512523
-190.490263604640288
-180.480254189145358
-170.476294634251547
-160.492528664996054
-150.490525346358977
-140.499174083182684
-130.531504898564182
-120.500871457036129
-110.476229111656654
-100.460093178718975
-90.467068792761659
-80.424748526565041
-70.407550767322113
-60.419630498641362
-50.394739050386485
-40.331845423115624
-30.306535628353887
-20.298190699677153
-10.264756953151722
00.245413608173256
10.243289242627615
20.235271354601554
30.191513368201674
40.166869602100989
50.154284120350016
60.134032581771784
70.12547245890537
80.127241243650577
90.114866045261243
100.0843359364204255
110.0712450431111733
120.0622546774456753
130.0442803400877107
140.0390509186938879
150.0517217464505859
160.041203473159116
170.0159215369209567
180.00627446445099098
190.00202434547259325
20-0.00701247835819204
21-0.0204052319567396
22-0.0154657207150843



Parameters (Session):
par1 = 1 ; par2 = 0 ; par3 = 0 ; par4 = 1 ; par5 = 1 ; par6 = 0 ; par7 = 0 ; par8 = na.fail ;
Parameters (R input):
par1 = 1 ; par2 = 0 ; par3 = 0 ; par4 = 1 ; par5 = 1 ; par6 = 0 ; par7 = 0 ; par8 = na.fail ;
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 (par8=='na.fail') par8 <- na.fail else par8 <- na.pass
ccf <- function (x, y, lag.max = NULL, type = c('correlation', 'covariance'), plot = TRUE, na.action = na.fail, ...) {
type <- match.arg(type)
if (is.matrix(x) || is.matrix(y))
stop('univariate time series only')
X <- na.action(ts.intersect(as.ts(x), as.ts(y)))
colnames(X) <- c(deparse(substitute(x))[1L], deparse(substitute(y))[1L])
acf.out <- acf(X, lag.max = lag.max, plot = FALSE, type = type, na.action=na.action)
lag <- c(rev(acf.out$lag[-1, 2, 1]), acf.out$lag[, 1, 2])
y <- c(rev(acf.out$acf[-1, 2, 1]), acf.out$acf[, 1, 2])
acf.out$acf <- array(y, dim = c(length(y), 1L, 1L))
acf.out$lag <- array(lag, dim = c(length(y), 1L, 1L))
acf.out$snames <- paste(acf.out$snames, collapse = ' & ')
if (plot) {
plot(acf.out, ...)
return(invisible(acf.out))
}
else return(acf.out)
}
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)
print(x)
print(y)
bitmap(file='test1.png')
(r <- ccf(x,y,na.action=par8,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')