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(99.4,102.7,109.3,93.9,95.3,101.8,85.6,81.1,109.5,104.0,94.5,79.0,92.8,95.6,101.7,90.8,89.5,91.8,83.8,77.4,112.7,98.8,85.7,72.8,96.9,95.0,94.2,87.3,80.6,87.9,79.6,71.9,94.6,91.4,86.6,68.5,90.1,91.6,95.4,85.4,81.6,88.9,84.1,74.7,97.1,95.3,85.1,67.3,80.6,87.9,89.2,81.3,79.7,83.7,82.1,69.3,91.2,85.7,85.2,70.0,85.8,91.4,97.5,87.1,85.1,94.1,85.8,74.7,99.9,90.7,86.8,74.8,91.8,97.6,100.8,85.4,84.0,90.6,80.5,73.9,93.6) > x <- c(101.5,99.2,107.8,92.3,99.2,101.6,87.0,71.4,104.7,115.1,102.5,75.3,96.7,94.6,98.6,99.5,92.0,93.6,89.3,66.9,108.8,113.2,105.5,77.8,102.1,97.0,95.5,99.3,86.4,92.4,85.7,61.9,104.9,107.9,95.6,79.8,94.8,93.7,108.1,96.9,88.8,106.7,86.8,69.8,110.9,105.4,99.2,84.4,87.2,91.9,97.9,94.5,85.0,100.3,78.7,65.8,104.8,96.0,103.3,82.9,91.4,94.5,109.3,92.1,99.3,109.6,87.5,73.1,110.7,111.6,110.7,84.0,101.6,102.1,113.9,99.0,100.4,109.5,93.0,76.8,105.3) > 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] -0.5 -0.5 4.5 -2.7 -4.2 8.2 -1.9 6.9 -8.4 -3.6 2.6 10.3 [13] -4.7 -6.9 4.0 -5.4 5.0 -0.3 -1.3 -12.6 10.7 8.3 -5.2 -2.5 [25] 3.4 4.6 -3.1 2.9 0.0 3.5 -1.7 -0.3 1.4 -5.4 0.3 -8.3 [37] 5.8 -2.5 2.1 2.2 -3.3 3.2 -3.4 -0.5 -3.7 9.7 2.6 2.5 [49] -1.7 4.8 -2.5 -0.4 5.0 -6.7 1.7 3.3 -3.7 -3.4 3.2 1.2 [61] 0.2 -2.9 -5.0 0.6 -2.4 -1.8 4.5 -5.5 > y [1] 3.3 6.6 -15.4 1.4 6.5 -16.2 -4.5 28.4 -5.5 -9.5 -15.5 13.8 [13] 2.8 6.1 -10.9 -1.3 2.3 -8.0 -6.4 35.3 -13.9 -13.1 -12.9 24.1 [25] -1.9 -0.8 -6.9 -6.7 7.3 -8.3 -7.7 22.7 -3.2 -4.8 -18.1 21.6 [37] 1.5 3.8 -10.0 -3.8 7.3 -4.8 -9.4 22.4 -1.8 -10.2 -17.8 13.3 [49] 7.3 1.3 -7.9 -1.6 4.0 -1.6 -12.8 21.9 -5.5 -0.5 -15.2 15.8 [61] 5.6 6.1 -10.4 -2.0 9.0 -8.3 -11.1 25.2 -9.2 -3.9 -12.0 17.0 [73] 5.8 3.2 -15.4 -1.4 6.6 -10.1 -6.6 19.7 > postscript(file="/var/www/html/rcomp/tmp/1yses1196519024.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 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 0.024 0.111 -0.141 0.128 -0.036 -0.023 -0.031 0.083 0.003 -0.013 -0.040 -4 -3 -2 -1 0 1 2 3 4 5 6 -0.107 0.026 0.153 0.043 -0.268 0.067 0.042 -0.045 0.039 0.034 -0.025 7 8 9 10 11 12 13 14 15 -0.068 -0.004 0.048 0.084 -0.024 -0.189 0.146 0.087 -0.095 > 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/2b01x1196519024.tab") > > system("convert tmp/1yses1196519024.ps tmp/1yses1196519024.png") > > > proc.time() user system elapsed 0.635 0.185 0.705