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(106.0,100.9,114.3,101.2,109.2,111.6,91.7,93.7,105.7,109.5,105.3,102.8,100.6,97.6,110.3,107.2,107.2,108.1,97.1,92.2,112.2,111.6,115.7,111.3,104.2,103.2,112.7,106.4,102.6,110.6,95.2,89.0,112.5,116.8,107.2,113.6,101.8,102.6,122.7,110.3,110.5,121.6,100.3,100.7,123.4,127.1,124.1,131.2,111.6,114.2,130.1,125.9,119.0,133.8,107.5,113.5,134.4,126.8,135.6,139.9,129.8,131.0,153.1,134.1,144.1,155.9,123.3,128.1,144.3,153.0,149.9,150.9,141.0,138.9,157.4,142.9,151.7,161.0,138.6,136.0,151.9) > x <- c(98.8,100.5,110.4,96.4,101.9,106.2,81.0,94.7,101.0,109.4,102.3,90.7,96.2,96.1,106.0,103.1,102.0,104.7,86.0,92.1,106.9,112.6,101.7,92.0,97.4,97.0,105.4,102.7,98.1,104.5,87.4,89.9,109.8,111.7,98.6,96.9,95.1,97.0,112.7,102.9,97.4,111.4,87.4,96.8,114.1,110.3,103.9,101.6,94.6,95.9,104.7,102.8,98.1,113.9,80.9,95.7,113.2,105.9,108.8,102.3,99.0,100.7,115.5,100.7,109.9,114.6,85.4,100.5,114.8,116.5,112.9,102.0,106.0,105.3,118.8,106.1,109.3,117.2,91.9,103.9,115.9) > 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] 2.1 -0.7 10.0 -8.0 -1.5 8.9 -6.9 8.0 -4.4 8.3 -1.9 -4.9 [13] 2.0 -3.2 -3.2 -3.8 7.1 -4.4 -1.3 3.5 4.9 -13.7 10.8 -4.7 [25] 1.8 10.6 -6.1 4.0 3.1 -5.9 6.6 -0.8 -0.6 6.6 0.7 -7.8 [37] 1.8 -4.2 8.2 -7.1 3.7 -5.0 5.6 -1.8 -11.3 11.8 -2.8 9.5 [49] -1.4 6.2 -14.8 16.9 -3.0 -6.3 -1.2 -4.7 16.3 -11.9 -3.3 0.2 [61] -3.3 -3.6 4.5 -1.2 -2.5 10.2 -7.4 -0.3 > y [1] -5.1 13.4 -13.1 8.0 2.4 -19.9 2.0 12.0 3.8 -4.2 -2.5 -2.2 [13] -3.0 12.7 -3.1 0.0 0.9 -11.0 -4.9 20.0 -0.6 4.1 -4.4 -7.1 [25] -1.0 9.5 -6.3 -3.8 8.0 -15.4 -6.2 23.5 4.3 -9.6 6.4 -11.8 [37] 0.8 20.1 -12.4 0.2 11.1 -21.3 0.4 22.7 3.7 -3.0 7.1 -19.6 [49] 2.6 15.9 -4.2 -6.9 14.8 -26.3 6.0 20.9 -7.6 8.8 4.3 -10.1 [61] 1.2 22.1 -19.0 10.0 11.8 -32.6 4.8 16.2 8.7 -3.1 1.0 -9.9 [73] -2.1 18.5 -14.5 8.8 9.3 -22.4 -2.6 15.9 > postscript(file="/var/www/html/rcomp/tmp/1jtba1198107003.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 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 0.165 -0.162 -0.122 0.377 -0.255 0.089 0.029 -0.116 0.056 0.057 -0.069 -4 -3 -2 -1 0 1 2 3 4 5 6 0.026 0.060 -0.165 0.182 -0.229 0.129 0.021 -0.042 -0.017 -0.028 0.083 7 8 9 10 11 12 13 14 15 -0.089 0.100 -0.023 -0.061 0.036 0.003 0.010 0.009 -0.020 > 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/2il9z1198107003.tab") > > system("convert tmp/1jtba1198107003.ps tmp/1jtba1198107003.png") > > > proc.time() user system elapsed 0.635 0.172 0.713