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(97.3,101,113.2,101,105.7,113.9,86.4,96.5,103.3,114.9,105.8,94.2,98.4,99.4,108.8,112.6,104.4,112.2,81.1,97.1,112.6,113.8,107.8,103.2,103.3,101.2,107.7,110.4,101.9,115.9,89.9,88.6,117.2,123.9,100,103.6,94.1,98.7,119.5,112.7,104.4,124.7,89.1,97,121.6,118.8,114,111.5,97.2,102.5,113.4,109.8,104.9,126.1,80,96.8,117.2,112.3,117.3,111.1,102.2,104.3,122.9,107.6,121.3,131.5,89,104.4,128.9,135.9,133.3,121.3,120.5,120.4,137.9,126.1,133.2,146.6,103.4,117.2) > x <- c(93.5,94.7,112.9,99.2,105.6,113.0,83.1,81.1,96.9,104.3,97.7,102.6,89.9,96.0,112.7,107.1,106.2,121.0,101.2,83.2,105.1,113.3,99.1,100.3,93.5,98.8,106.2,98.3,102.1,117.1,101.5,80.5,105.9,109.5,97.2,114.5,93.5,100.9,121.1,116.5,109.3,118.1,108.3,105.4,116.2,111.2,105.8,122.7,99.5,107.9,124.6,115.0,110.3,132.7,99.7,96.5,118.7,112.9,130.5,137.9,115.0,116.8,140.9,120.7,134.2,147.3,112.4,107.1,128.4,137.7,135.0,151.0,137.4,132.4,161.3,139.8,146.0,154.6,142.1,120.5) > 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] 92.5 93.7 111.9 98.2 104.6 112.0 82.1 80.1 95.9 103.3 96.7 101.6 [13] 88.9 95.0 111.7 106.1 105.2 120.0 100.2 82.2 104.1 112.3 98.1 99.3 [25] 92.5 97.8 105.2 97.3 101.1 116.1 100.5 79.5 104.9 108.5 96.2 113.5 [37] 92.5 99.9 120.1 115.5 108.3 117.1 107.3 104.4 115.2 110.2 104.8 121.7 [49] 98.5 106.9 123.6 114.0 109.3 131.7 98.7 95.5 117.7 111.9 129.5 136.9 [61] 114.0 115.8 139.9 119.7 133.2 146.3 111.4 106.1 127.4 136.7 134.0 150.0 [73] 136.4 131.4 160.3 138.8 145.0 153.6 141.1 119.5 > y [1] 96.3 100.0 112.2 100.0 104.7 112.9 85.4 95.5 102.3 113.9 104.8 93.2 [13] 97.4 98.4 107.8 111.6 103.4 111.2 80.1 96.1 111.6 112.8 106.8 102.2 [25] 102.3 100.2 106.7 109.4 100.9 114.9 88.9 87.6 116.2 122.9 99.0 102.6 [37] 93.1 97.7 118.5 111.7 103.4 123.7 88.1 96.0 120.6 117.8 113.0 110.5 [49] 96.2 101.5 112.4 108.8 103.9 125.1 79.0 95.8 116.2 111.3 116.3 110.1 [61] 101.2 103.3 121.9 106.6 120.3 130.5 88.0 103.4 127.9 134.9 132.3 120.3 [73] 119.5 119.4 136.9 125.1 132.2 145.6 102.4 116.2 > postscript(file="/var/www/html/rcomp/tmp/1ofiz1195998850.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 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 0.056 0.214 0.025 0.075 0.498 0.335 0.116 0.239 0.172 0.218 0.565 -5 -4 -3 -2 -1 0 1 2 3 4 5 0.402 0.281 0.470 0.220 0.290 0.788 0.560 0.329 0.393 0.232 0.250 6 7 8 9 10 11 12 13 14 15 16 0.519 0.289 0.161 0.269 -0.024 -0.004 0.356 0.196 0.041 0.100 -0.034 > 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/29gpb1195998851.tab") > > system("convert tmp/1ofiz1195998850.ps tmp/1ofiz1195998850.png") > > > proc.time() user system elapsed 0.648 0.182 0.723