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(68.4,70.6,83.9,90.1,90.6,87.1,90.8,94.1,99.8,96.8,87,96.3,107.1,115.2,106.1,89.5,91.3,97.6,100.7,104.6,94.7,101.8,102.5,105.3,110.3,109.8,117.3,118.8,131.3,125.9,133.1,147,145.8,164.4,149.8,137.7,151.7,156.8,180,180.4,170.4,191.6,199.5,218.2,217.5,205,194,199.3,219.3,211.1,215.2,240.2,242.2,240.7,255.4,253,218.2,203.7,205.6,215.6) > x <- c(101.17,101.93,102.05,102.08,102.14,102.15,95.42,95.43,95.43,95.43,95.43,95.57,95.71,94.58,94.6,94.61,94.62,94.66,94.66,94.69,94.79,94.79,94.79,94.79,94.8,95.46,95.49,95.74,95.74,95.74,95.75,95.83,95.83,95.84,95.81,95.81,95.8,97.06,97.15,97.14,97.48,97.48,97.48,97.5,97.63,97.86,97.87,97.87,97.84,98.72,100.49,100.54,100.54,100.54,100.55,100.59,100.60,100.62,100.68,100.68) > 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] 100.17 100.93 101.05 101.08 101.14 101.15 94.42 94.43 94.43 94.43 [11] 94.43 94.57 94.71 93.58 93.60 93.61 93.62 93.66 93.66 93.69 [21] 93.79 93.79 93.79 93.79 93.80 94.46 94.49 94.74 94.74 94.74 [31] 94.75 94.83 94.83 94.84 94.81 94.81 94.80 96.06 96.15 96.14 [41] 96.48 96.48 96.48 96.50 96.63 96.86 96.87 96.87 96.84 97.72 [51] 99.49 99.54 99.54 99.54 99.55 99.59 99.60 99.62 99.68 99.68 > y [1] 67.4 69.6 82.9 89.1 89.6 86.1 89.8 93.1 98.8 95.8 86.0 95.3 [13] 106.1 114.2 105.1 88.5 90.3 96.6 99.7 103.6 93.7 100.8 101.5 104.3 [25] 109.3 108.8 116.3 117.8 130.3 124.9 132.1 146.0 144.8 163.4 148.8 136.7 [37] 150.7 155.8 179.0 179.4 169.4 190.6 198.5 217.2 216.5 204.0 193.0 198.3 [49] 218.3 210.1 214.2 239.2 241.2 239.7 254.4 252.0 217.2 202.7 204.6 214.6 > postscript(file="/var/www/html/rcomp/tmp/1pcd81198422863.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 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -0.209 -0.170 -0.131 -0.095 -0.056 0.001 0.047 0.085 0.133 0.191 0.257 -3 -2 -1 0 1 2 3 4 5 6 7 0.308 0.354 0.393 0.420 0.459 0.505 0.549 0.593 0.632 0.677 0.660 8 9 10 11 12 13 14 0.635 0.605 0.579 0.559 0.535 0.515 0.481 > 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/2ltu11198422864.tab") > > system("convert tmp/1pcd81198422863.ps tmp/1pcd81198422863.png") > > > proc.time() user system elapsed 0.619 0.177 0.681