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(103.7,103.75,103.85,104.02,104.13,104.17,104.18,104.2,104.5,104.78,104.88,104.89,104.9,104.95,105.24,105.35,105.44,105.46,105.47,105.48,105.75,106.1,106.19,106.23,106.24,106.25,106.35,106.48,106.52,106.55,106.55,106.56,106.89,107.09,107.24,107.28,107.3,107.31,107.47,107.35,107.31,107.32,107.32,107.34,107.53,107.72,107.75,107.79,107.81,107.9,107.8,107.86,107.8,107.74,107.75,107.83,107.8,107.81,107.86,107.83) > x <- c(106.48,106.83,107.14,107.94,108.46,108.81,108.92,108.99,109.16,109.22,109.43,109.23,109.93,110.09,110.33,110.11,110.35,110.09,110.44,110.39,110.62,110.43,110.46,110.55,110.94,111.56,111.82,111.73,111.57,111.85,112.06,112.2,112.47,112.15,112.36,112.32,112.67,113.02,113.05,113.5,113.67,113.65,114,114.03,114.08,114.49,114.48,114.25,114.68,115.28,115.9,115.87,116.09,116.29,116.76,116.78,116.65,116.46,116.82,116.91) > 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] 105.48 105.83 106.14 106.94 107.46 107.81 107.92 107.99 108.16 108.22 [11] 108.43 108.23 108.93 109.09 109.33 109.11 109.35 109.09 109.44 109.39 [21] 109.62 109.43 109.46 109.55 109.94 110.56 110.82 110.73 110.57 110.85 [31] 111.06 111.20 111.47 111.15 111.36 111.32 111.67 112.02 112.05 112.50 [41] 112.67 112.65 113.00 113.03 113.08 113.49 113.48 113.25 113.68 114.28 [51] 114.90 114.87 115.09 115.29 115.76 115.78 115.65 115.46 115.82 115.91 > y [1] 102.70 102.75 102.85 103.02 103.13 103.17 103.18 103.20 103.50 103.78 [11] 103.88 103.89 103.90 103.95 104.24 104.35 104.44 104.46 104.47 104.48 [21] 104.75 105.10 105.19 105.23 105.24 105.25 105.35 105.48 105.52 105.55 [31] 105.55 105.56 105.89 106.09 106.24 106.28 106.30 106.31 106.47 106.35 [41] 106.31 106.32 106.32 106.34 106.53 106.72 106.75 106.79 106.81 106.90 [51] 106.80 106.86 106.80 106.74 106.75 106.83 106.80 106.81 106.86 106.83 > postscript(file="/var/www/html/rcomp/tmp/1iyo21195927463.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 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 0.178 0.226 0.271 0.317 0.365 0.418 0.475 0.536 0.596 0.655 0.713 0.770 0.827 -1 0 1 2 3 4 5 6 7 8 9 10 11 0.886 0.944 0.901 0.859 0.820 0.788 0.755 0.723 0.692 0.658 0.623 0.588 0.548 12 13 14 0.506 0.471 0.437 > 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/2tfy11195927463.tab") > > system("convert tmp/1iyo21195927463.ps tmp/1iyo21195927463.png") > > > proc.time() user system elapsed 0.642 0.182 0.713