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, 24 Sep 2014 06:05:34 +0100
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2014/Sep/24/t1411535175pts1f6esk6ylfj0.htm/, Retrieved Fri, 10 May 2024 11:23:01 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=236083, Retrieved Fri, 10 May 2024 11:23:01 +0000
QR Codes:

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

Post a new message
Dataseries X:
-9
-8.8
-10
-7.4
-10.6
-12.2
-10.3
-8.7
-6.3
3.9
4.2
-3.9
-10.8
-40
-50
-45
-38
-29
-15
0.7
12
16.7
8.4
-19
-34
-37
-42
-32
-36
-69
-156
-148
-120
-99

Dataseries Y:
54006	
38265	
80467	
77748	
103211	
89454	
126065	
114960	
127068	
127611	
114459	
123351	
91604	
91710	
100189	
126542	
91261	
94251	
128234	
132633	
129894	
129742	
116678	
115944	
137099	
126245	
84721	
76578	
106073	
95.374	
62962	
68199	
71665	
76575	
40646	
44561	
51972	




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time0 seconds
R Server'Gertrude Mary Cox' @ cox.wessa.net
R Framework error message
Warning: there are blank lines in the 'Data X' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.

\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 & 0 seconds \tabularnewline
R Server & 'Gertrude Mary Cox' @ cox.wessa.net \tabularnewline
R Framework error message & 
Warning: there are blank lines in the 'Data X' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.
\tabularnewline \hline \end{tabular} %Source: https://freestatistics.org/blog/index.php?pk=236083&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]0 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gertrude Mary Cox' @ cox.wessa.net[/C][/ROW]
[ROW][C]R Framework error message[/C][C]
Warning: there are blank lines in the 'Data X' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.
[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=236083&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=236083&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 time0 seconds
R Server'Gertrude Mary Cox' @ cox.wessa.net
R Framework error message
Warning: there are blank lines in the 'Data X' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.







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])
-120.0416362961989584
-11-0.0299068384681295
-10-0.0732303684809877
-9-0.0755023864058522
-8-0.0659810949909815
-7-0.0304721698618351
-60.0545029325533648
-50.0967487362360838
-40.165190260573616
-30.277588091329131
-20.330161006005237
-10.383954293776815
00.484100386328842
10.606234926913829
20.474479905940947
30.356084472408574
40.197903960690996
5-0.11383331729977
6-0.234660960529316
7-0.316606558899434
8-0.360521048242356
9-0.348010798243531
10-0.290562342680702
11-0.257974612496417
12-0.179605440470071

\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
-12 & 0.0416362961989584 \tabularnewline
-11 & -0.0299068384681295 \tabularnewline
-10 & -0.0732303684809877 \tabularnewline
-9 & -0.0755023864058522 \tabularnewline
-8 & -0.0659810949909815 \tabularnewline
-7 & -0.0304721698618351 \tabularnewline
-6 & 0.0545029325533648 \tabularnewline
-5 & 0.0967487362360838 \tabularnewline
-4 & 0.165190260573616 \tabularnewline
-3 & 0.277588091329131 \tabularnewline
-2 & 0.330161006005237 \tabularnewline
-1 & 0.383954293776815 \tabularnewline
0 & 0.484100386328842 \tabularnewline
1 & 0.606234926913829 \tabularnewline
2 & 0.474479905940947 \tabularnewline
3 & 0.356084472408574 \tabularnewline
4 & 0.197903960690996 \tabularnewline
5 & -0.11383331729977 \tabularnewline
6 & -0.234660960529316 \tabularnewline
7 & -0.316606558899434 \tabularnewline
8 & -0.360521048242356 \tabularnewline
9 & -0.348010798243531 \tabularnewline
10 & -0.290562342680702 \tabularnewline
11 & -0.257974612496417 \tabularnewline
12 & -0.179605440470071 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=236083&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]-12[/C][C]0.0416362961989584[/C][/ROW]
[ROW][C]-11[/C][C]-0.0299068384681295[/C][/ROW]
[ROW][C]-10[/C][C]-0.0732303684809877[/C][/ROW]
[ROW][C]-9[/C][C]-0.0755023864058522[/C][/ROW]
[ROW][C]-8[/C][C]-0.0659810949909815[/C][/ROW]
[ROW][C]-7[/C][C]-0.0304721698618351[/C][/ROW]
[ROW][C]-6[/C][C]0.0545029325533648[/C][/ROW]
[ROW][C]-5[/C][C]0.0967487362360838[/C][/ROW]
[ROW][C]-4[/C][C]0.165190260573616[/C][/ROW]
[ROW][C]-3[/C][C]0.277588091329131[/C][/ROW]
[ROW][C]-2[/C][C]0.330161006005237[/C][/ROW]
[ROW][C]-1[/C][C]0.383954293776815[/C][/ROW]
[ROW][C]0[/C][C]0.484100386328842[/C][/ROW]
[ROW][C]1[/C][C]0.606234926913829[/C][/ROW]
[ROW][C]2[/C][C]0.474479905940947[/C][/ROW]
[ROW][C]3[/C][C]0.356084472408574[/C][/ROW]
[ROW][C]4[/C][C]0.197903960690996[/C][/ROW]
[ROW][C]5[/C][C]-0.11383331729977[/C][/ROW]
[ROW][C]6[/C][C]-0.234660960529316[/C][/ROW]
[ROW][C]7[/C][C]-0.316606558899434[/C][/ROW]
[ROW][C]8[/C][C]-0.360521048242356[/C][/ROW]
[ROW][C]9[/C][C]-0.348010798243531[/C][/ROW]
[ROW][C]10[/C][C]-0.290562342680702[/C][/ROW]
[ROW][C]11[/C][C]-0.257974612496417[/C][/ROW]
[ROW][C]12[/C][C]-0.179605440470071[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=236083&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=236083&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])
-120.0416362961989584
-11-0.0299068384681295
-10-0.0732303684809877
-9-0.0755023864058522
-8-0.0659810949909815
-7-0.0304721698618351
-60.0545029325533648
-50.0967487362360838
-40.165190260573616
-30.277588091329131
-20.330161006005237
-10.383954293776815
00.484100386328842
10.606234926913829
20.474479905940947
30.356084472408574
40.197903960690996
5-0.11383331729977
6-0.234660960529316
7-0.316606558899434
8-0.360521048242356
9-0.348010798243531
10-0.290562342680702
11-0.257974612496417
12-0.179605440470071



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):
par8 <- 'na.fail'
par7 <- '0'
par6 <- '0'
par5 <- '1'
par4 <- '1'
par3 <- '0'
par2 <- '0'
par1 <- '1'
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)
x
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')