R version 2.6.0 (2007-10-03) Copyright (C) 2007 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > y <- c(544.5,619.8,777.6,640.4,633.0,722.0,860.1,495.1,692.8,766.7,648.5,640.0,681.6,752.5,1031.7,685.5,887.6,655.4,944.2,626.6,1221.8,939.6,886.6,811.3,774.7,910.6,911.6,697.7,829.8,824.3,885.6,538.9,686.0,878.7,812.7,640.4,773.9,795.9,836.3,876.1,851.7,692.4,877.3,536.8,705.9,951.0,755.7,695.5,744.8,672.1,666.6,760.8,756.0,604.4,883.9,527.9,756.2,812.9,655.6,707.6) > x <- c(40.3,38.4,46.9,56.1,57.4,58.5,66.6,71.8,80.7,78.2,85.0,87.6,88.6,95.0,96.3,83.3,96.9,103.4,99.3,103.8,113.4,111.5,114.2,90.6,90.8,96.4,90.0,92.1,97.2,95.1,88.5,91.0,90.5,75.0,66.3,66.0,68.4,70.6,83.9,90.1,90.6,87.1,90.8,94.1,99.8,96.8,87.0,96.3,107.1,115.2,106.1,89.5,91.3,97.6,100.7,104.6,94.7,101.8,102.5,105.3) > par7 = '0' > par6 = '0' > par5 = '1' > par4 = '12' > par3 = '0' > par2 = '0' > par1 = '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > 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) x <- diff(y,lag=par4,difference=par7) > x [1] 39.3 37.4 45.9 55.1 56.4 57.5 65.6 70.8 79.7 77.2 84.0 86.6 [13] 87.6 94.0 95.3 82.3 95.9 102.4 98.3 102.8 112.4 110.5 113.2 89.6 [25] 89.8 95.4 89.0 91.1 96.2 94.1 87.5 90.0 89.5 74.0 65.3 65.0 [37] 67.4 69.6 82.9 89.1 89.6 86.1 89.8 93.1 98.8 95.8 86.0 95.3 [49] 106.1 114.2 105.1 88.5 90.3 96.6 99.7 103.6 93.7 100.8 101.5 104.3 > y [1] 543.5 618.8 776.6 639.4 632.0 721.0 859.1 494.1 691.8 765.7 [11] 647.5 639.0 680.6 751.5 1030.7 684.5 886.6 654.4 943.2 625.6 [21] 1220.8 938.6 885.6 810.3 773.7 909.6 910.6 696.7 828.8 823.3 [31] 884.6 537.9 685.0 877.7 811.7 639.4 772.9 794.9 835.3 875.1 [41] 850.7 691.4 876.3 535.8 704.9 950.0 754.7 694.5 743.8 671.1 [51] 665.6 759.8 755.0 603.4 882.9 526.9 755.2 811.9 654.6 706.6 > postscript(file="/var/www/html/rcomp/tmp/11f941196280312.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > (r <- ccf(x,y,main='Cross Correlation Function',xlab='Lag (k)')) Autocorrelations of series 'X', by lag -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -0.180 -0.132 -0.058 -0.072 0.010 0.048 0.132 0.206 0.146 0.087 0.177 -3 -2 -1 0 1 2 3 4 5 6 7 0.177 0.190 0.242 0.291 0.220 0.258 0.179 0.155 0.116 0.041 0.019 8 9 10 11 12 13 14 0.031 -0.072 -0.081 -0.061 -0.132 -0.192 -0.165 > dev.off() null device 1 > load(file='/var/www/html/rcomp/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="/var/www/html/rcomp/tmp/22n6l1196280312.tab") > > system("convert tmp/11f941196280312.ps tmp/11f941196280312.png") > > > proc.time() user system elapsed 0.626 0.183 0.704