Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
0.1358 0.1387 0.1363 0.1377 0.1407 0.1422 0.1431 0.1446 0.1461 0.1466 0.1471 0.1475 0.1475 0.1485 0.1475 0.148 0.148 0.1485 0.1475 0.148 0.148 0.1485 0.1485 0.148 0.149 0.1485 0.148 0.1475 0.1471 0.1471 0.1456 0.1456 0.1451 0.1451 0.1446 0.1446 0.1446 0.1451 0.1441 0.1441 0.1436 0.1436 0.1436 0.1431 0.1431 0.1436 0.1431 0.1426 0.1431 0.1431 0.1426 0.1426 0.1422 0.1422 0.1422 0.1426 0.1426 0.1422 0.1417 0.1417 0.1422 0.1422 0.1426 0.1422 0.1422 0.1422 0.1422 0.1422 0.1431 0.1426 0.1426 0.1422 0.1422 0.1426 0.1422 0.1426 0.1426 0.1426 0.1426 0.1426 0.1422 0.1422 0.1426 0.1426 0.1422 0.1422 0.1426 0.1426 0.1422 0.1422 0.1426 0.1422 0.1426 0.1422 0.1422 0.1417 0.1422 0.1422 0.1417 0.1426 0.1417 0.1412 0.1422 0.1417 0.1407 0.1407 0.1402 0.1407 0.1407 0.1407 0.1402 0.1397 0.1397 0.1397 0.1397 0.1392 0.1387 0.1392 0.1387 0.1392 0.1382 0.1392 0.1377 0.1377 0.1382 0.1382 0.1382 0.1373 0.1373 0.1373 0.1377 0.1373 0.1373 0.1373 0.1368 0.1363 0.1368 0.1368 0.1363 0.1358 0.1353 0.1353 0.1343 0.1348 0.1343 0.1343
Data Y:
-67.48769 -64.93435 -62.09455 -59.24374 -56.24434 -53.29357 -50.24352 -47.21371 -44.31956 -41.40615 -38.67882 -36.07201 -33.53312 -31.24318 -29.06622 -27.10601 -25.44346 -23.95676 -22.79198 -21.83444 -21.21284 -20.82125 -20.76539 -20.99605 -21.44044 -22.24562 -23.3189 -24.66141 -26.26336 -28.08825 -30.15747 -32.43541 -34.91399 -37.57035 -40.37001 -43.2971 -46.32778 -49.41776 -52.56352 -55.74308 -58.90207 -62.03418 -65.11547 -68.08083 -70.93258 -73.63394 -76.16604 -78.49364 -80.59772 -82.46155 -84.05849 -85.37479 -86.38548 -87.08258 -87.44406 -87.47346 -87.14482 -86.47578 -85.43721 -84.05641 -82.30603 -80.19695 -77.77158 -74.98702 -71.90565 -68.5277 -64.824 -60.87651 -56.64985 -52.18774 -47.56321 -42.72731 -37.76972 -32.66815 -27.50522 -22.30677 -17.01678 -11.75518 -6.494408 -1.300473 3.773934 8.736804 13.53007 18.14927 22.54604 26.70576 30.59934 34.20228 37.48168 40.43245 43.04378 45.2574 47.12449 48.55617 49.63199 50.30155 50.50163 50.3484 49.71404 48.66773 47.20958 45.52402 43.37497 40.76828 37.89896 34.59856 31.07775 27.26912 23.08356 18.6522 14.00902 9.275627 4.388309 -0.7375945 -5.85959 -11.15065 -16.37748 -21.49657 -26.80144 -32.05593 -37.20892 -42.15165 -46.9585 -51.67009 -56.10513 -60.32025 -64.29823 -68.01822 -71.50566 -74.64172 -77.55137 -80.04708 -82.2119 -84.0584 -85.54139 -86.68427 -87.47647 -87.92064 -88.03718 -87.83202 -87.28342 -86.42725 -85.27068 -83.88298 -82.24538 -80.32531
Sample Range:
(leave blank to include all observations)
From:
To:
Box-Cox transformation parameter (X series)
1
1
-2.0
-1.9
-1.8
-1.7
-1.6
-1.5
-1.4
-1.3
-1.2
-1.1
-1.0
-0.9
-0.8
-0.7
-0.6
-0.5
-0.4
-0.3
-0.2
-0.1
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.0
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
2.0
Degree (d) of non-seasonal differencing (X series)
0
0
1
2
Degree (D) of seasonal differencing (X series)
0
0
1
2
Seasonal Period
1
1
2
3
4
12
Box-Cox transformation parameter (Y series)
1
1
-2.0
-1.9
-1.8
-1.7
-1.6
-1.5
-1.4
-1.3
-1.2
-1.1
-1.0
-0.9
-0.8
-0.7
-0.6
-0.5
-0.4
-0.3
-0.2
-0.1
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.0
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
2.0
Degree (d) of non-seasonal differencing (Y series)
0
0
1
2
Degree (D) of seasonal differencing (Y series)
0
0
1
2
Treatment of missing data
(?)
na.pass
na.fail
na.pass
Chart options
Label y-axis:
Label x-axis:
R Code
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')
Compute
Summary of computational transaction
Raw Input
view raw input (R code)
Raw Output
view raw output of R engine
Computing time
0 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation