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(20,19.5,19.5,24.5,17.3,15.8,28.2,18.1,26.9,11.6,16.4,22.6,30.3,15.3,13.1,24,14.6,25,19.7,18.7,7.4,30.7,28.3,14.8,17.5,23.4,24.6,16.9,22.9,20,23.5,18.3,19.7,21.4,14.6,20.3,11.7,25.8,17.5,22.1,22.2,16.7,23.2,16.6,19.5,16.3,29.7,22.6,22.5,18.3,24.8,17.5,19.6,25,13.3,21.7,23.3,16.3,16.6,23.2,21.2,20.2,17.1,15,20.6,17.6,18.2,24.5,14.5) > x <- c(15.2,15.4,10.8,27.2,12.8,12,22.3,15.5,24.1,18.1,23,22.5,25.4,22.4,16.9,19.8,14.4,18.8,16.4,15,16.1,14.7,10.1,22,12.7,16.7,32.6,17.6,22.4,34.3,21.1,27.9,26,17.5,23.6,24.6,12.4,18.2,9.8,17.6,16.2,13.6,11.9,16,13.9,10.6,24.1,18.5,24.2,22.6,31.4,17.6,34.3,29.3,28.8,27.3,25.9,35.6,27.4,21.1,30.2,27.6,24.6,26.9,21.1,19.9,25.5,23.7,14.6) > par7 = '1' > par6 = '1' > par5 = '1' > par4 = '12' > par3 = '1' > 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] -14.5 -2.2 5.9 -2.2 11.9 -17.7 9.1 -20.1 38.6 -7.2 -19.7 -5.0 [13] 20.9 3.4 -18.6 15.4 -13.3 8.8 -4.2 12.7 -21.6 -4.4 19.2 -11.3 [25] 8.2 -9.5 12.3 -5.9 -2.6 3.0 -1.4 1.5 -4.9 20.2 -12.8 8.5 [37] -18.3 14.8 -11.9 2.0 10.9 -18.2 15.0 -1.3 -3.8 -13.1 13.7 -1.9 [49] 3.2 -9.6 5.2 3.5 -8.4 12.3 -2.1 -11.6 > y [1] -0.5 0.0 5.0 -7.2 -1.5 12.4 -10.1 8.8 -15.3 4.8 6.2 7.7 [13] -15.0 -2.2 10.9 -9.4 10.4 -5.3 -1.0 -11.3 23.3 -2.4 -13.5 2.7 [25] 5.9 1.2 -7.7 6.0 -2.9 3.5 -5.2 1.4 1.7 -6.8 5.7 -8.6 [37] 14.1 -8.3 4.6 0.1 -5.5 6.5 -6.6 2.9 -3.2 13.4 -7.1 -0.1 [49] -4.2 6.5 -7.3 2.1 5.4 -11.7 8.4 1.6 -7.0 0.3 6.6 -2.0 [61] -1.0 -3.1 -2.1 5.6 -3.0 0.6 6.3 -10.0 > postscript(file="/var/www/html/rcomp/tmp/1xzxq1197402210.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > (r <- ccf(x,y,main='Cross Correlation Function',ylab='CCF',xlab='Lag (k)')) Autocorrelations of series 'X', by lag -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 0.040 -0.367 0.697 -0.447 0.122 -0.272 0.418 -0.234 0.021 0.186 -0.408 -3 -2 -1 0 1 2 3 4 5 6 7 0.333 -0.177 0.516 -0.833 0.436 -0.009 0.022 -0.010 -0.176 0.271 -0.311 8 9 10 11 12 13 14 0.381 -0.302 0.181 -0.196 0.132 0.063 -0.157 > 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/2svhs1197402210.tab") > > system("convert tmp/1xzxq1197402210.ps tmp/1xzxq1197402210.png") > > > proc.time() user system elapsed 0.642 0.183 0.724