R version 2.6.1 (2007-11-26) 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(75.6,48.7,111.7,119.5,103.4,96.3,96.6,110.4,104.4,110.7,93.6,114.8,74.9,69.8,104.2,109.3,92.7,91.7,84.4,94.5,103.6,105.9,108,119.9,84.5,76.7,120.5,119.6,102.3,101.7,86.9,93.6,113.6,106.7,96.1,124.6,72.5,89,115.3,119.1,104.4,104.9,76.9,95.3,114.9,98.9,102.9,90,81,66.2,86.7,86.7,103.4,89.5,113.7,120.2,137.8,99.1,110.4,112.3,82.2,72.2,106.7,106.4,110,87.5,79.7,83.3,91.8,89.2,90.6,92.6) > x <- c(85.6,89,97.5,104,99.4,103.2,103,91.2,85.9,80.7,86.7,80.7,81.5,83.4,83.5,89.5,85.8,77.4,67.5,63.7,59.4,62,62.4,58.1,58,56.3,61.4,59.8,54.3,47,50.5,48.1,58.8,70.4,71.9,73.3,83.5,90.1,101.3,98.3,106.7,109.9,111.1,119,120.7,104.5,121.6,129.6,124.5,130.1,142.3,140,143.3,113.4,113.8,120.7,112.9,115.5,121.9,119.3,111,114.2,113.5,94,83.2,82.8,85.8,88.7,105.3,113.1,113.8,109.4) > par7 = '0' > par6 = '0' > par5 = '1' > par4 = '12' > par3 = '0' > par2 = '1' > 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] 3.4 8.5 6.5 -4.6 3.8 -0.2 -11.8 -5.3 -5.2 6.0 -6.0 0.8 [13] 1.9 0.1 6.0 -3.7 -8.4 -9.9 -3.8 -4.3 2.6 0.4 -4.3 -0.1 [25] -1.7 5.1 -1.6 -5.5 -7.3 3.5 -2.4 10.7 11.6 1.5 1.4 10.2 [37] 6.6 11.2 -3.0 8.4 3.2 1.2 7.9 1.7 -16.2 17.1 8.0 -5.1 [49] 5.6 12.2 -2.3 3.3 -29.9 0.4 6.9 -7.8 2.6 6.4 -2.6 -8.3 [61] 3.2 -0.7 -19.5 -10.8 -0.4 3.0 2.9 16.6 7.8 0.7 -4.4 > y [1] 74.6 47.7 110.7 118.5 102.4 95.3 95.6 109.4 103.4 109.7 92.6 113.8 [13] 73.9 68.8 103.2 108.3 91.7 90.7 83.4 93.5 102.6 104.9 107.0 118.9 [25] 83.5 75.7 119.5 118.6 101.3 100.7 85.9 92.6 112.6 105.7 95.1 123.6 [37] 71.5 88.0 114.3 118.1 103.4 103.9 75.9 94.3 113.9 97.9 101.9 89.0 [49] 80.0 65.2 85.7 85.7 102.4 88.5 112.7 119.2 136.8 98.1 109.4 111.3 [61] 81.2 71.2 105.7 105.4 109.0 86.5 78.7 82.3 90.8 88.2 89.6 91.6 > postscript(file="/var/www/html/rcomp/tmp/1s7wz1197975381.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.007 0.103 0.044 -0.217 -0.155 -0.009 0.151 0.101 0.113 0.078 -0.015 -4 -3 -2 -1 0 1 2 3 4 5 6 -0.174 -0.026 0.049 -0.061 -0.230 -0.060 0.185 0.043 0.083 0.139 -0.098 7 8 9 10 11 12 13 14 15 -0.113 -0.082 0.066 0.307 0.117 0.002 0.066 0.057 0.037 > 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/2eoyl1197975381.tab") > > system("convert tmp/1s7wz1197975381.ps tmp/1s7wz1197975381.png") > > > proc.time() user system elapsed 1.191 0.274 1.230