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(12398.4,13882.3,15861.5,13286.1,15634.9,14211.0,13646.8,12224.6,15916.4,16535.9,15796.0,14418.6,15044.5,14944.2,16754.8,14254.0,15454.9,15644.8,14568.3,12520.2,14803.0,15873.2,14755.3,12875.1,14291.1,14205.3,15859.4,15258.9,15498.6,15106.5,15023.6,12083.0,15761.3,16943.0,15070.3,13659.6,14768.9,14725.1,15998.1,15370.6,14956.9,15469.7,15101.8,11703.7,16283.6,16726.5,14968.9,14861.0,14583.3,15305.8,17903.9,16379.4,15420.3,17870.5,15912.8,13866.5,17823.2,17872.0,17420.4,16704.4,15991.2,16583.6,19123.5,17838.7,17209.4) > x <- c(103.6500,103.8700,103.9400,105.3200,105.5400,106.0800,106.2100,105.5300,105.5600,105.1400,105.9700,105.4500,106.2200,106.3100,107.3800,109.3100,110.8200,111.2200,110.6600,110.7600,110.6900,111.0800,110.9700,110.2400,112.5100,111.5200,112.1300,112.2300,112.9200,111.8900,111.9900,111.5100,112.3300,112.0400,112.0900,111.4100,112.6100,113.1400,113.6500,114.2600,114.4000,114.9300,114.8600,114.9500,116.1700,114.6000,114.6200,113.8200,115.0200,115.1800,115.5900,116.6000,117.0700,116.9600,116.6600,116.0700,116.0400,115.8100,116.2200,115.8500,116.4300,117.3900,119.1700,119.2400,120.0300) > 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] 102.65 102.87 102.94 104.32 104.54 105.08 105.21 104.53 104.56 104.14 [11] 104.97 104.45 105.22 105.31 106.38 108.31 109.82 110.22 109.66 109.76 [21] 109.69 110.08 109.97 109.24 111.51 110.52 111.13 111.23 111.92 110.89 [31] 110.99 110.51 111.33 111.04 111.09 110.41 111.61 112.14 112.65 113.26 [41] 113.40 113.93 113.86 113.95 115.17 113.60 113.62 112.82 114.02 114.18 [51] 114.59 115.60 116.07 115.96 115.66 115.07 115.04 114.81 115.22 114.85 [61] 115.43 116.39 118.17 118.24 119.03 > y [1] 12397.4 13881.3 15860.5 13285.1 15633.9 14210.0 13645.8 12223.6 15915.4 [10] 16534.9 15795.0 14417.6 15043.5 14943.2 16753.8 14253.0 15453.9 15643.8 [19] 14567.3 12519.2 14802.0 15872.2 14754.3 12874.1 14290.1 14204.3 15858.4 [28] 15257.9 15497.6 15105.5 15022.6 12082.0 15760.3 16942.0 15069.3 13658.6 [37] 14767.9 14724.1 15997.1 15369.6 14955.9 15468.7 15100.8 11702.7 16282.6 [46] 16725.5 14967.9 14860.0 14582.3 15304.8 17902.9 16378.4 15419.3 17869.5 [55] 15911.8 13865.5 17822.2 17871.0 17419.4 16703.4 15990.2 16582.6 19122.5 [64] 17837.7 17208.4 > postscript(file="/var/www/html/rcomp/tmp/1re111196187616.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.267 0.264 0.288 0.319 0.327 0.320 0.294 0.277 0.299 0.350 0.362 -4 -3 -2 -1 0 1 2 3 4 5 6 0.326 0.331 0.345 0.398 0.485 0.432 0.401 0.324 0.326 0.290 0.291 7 8 9 10 11 12 13 14 15 0.248 0.191 0.098 0.138 0.141 0.096 0.056 0.024 -0.049 > 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/2pblf1196187616.tab") > > system("convert tmp/1re111196187616.ps tmp/1re111196187616.png") > > > proc.time() user system elapsed 0.634 0.175 0.706