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(20,19.5,19.5,24.5,17.3,15.8,28.2,18.1,26.9,11.6,16.4,22.6,30.3,15.3,13.1,24,14.6,25,19.7,18.7,7.4,30.7,28.3,14.8,17.5,23.4,24.6,16.9,22.9,20,23.5,18.3,19.7,21.4,14.6,20.3,11.7,25.8,17.5,22.1,22.2,16.7,23.2,16.6,19.5,16.3,29.7,22.6,22.5,18.3,24.8,17.5,19.6,25,13.3,21.7,23.3,16.3,16.6,23.2,21.2,20.2,17.1,15,20.6,17.6,18.2,24.5,14.5) > x <- c(15.2,15.4,10.8,27.2,12.8,12,22.3,15.5,24.1,18.1,23,22.5,25.4,22.4,16.9,19.8,14.4,18.8,16.4,15,16.1,14.7,10.1,22,12.7,16.7,32.6,17.6,22.4,34.3,21.1,27.9,26,17.5,23.6,24.6,12.4,18.2,9.8,17.6,16.2,13.6,11.9,16,13.9,10.6,24.1,18.5,24.2,22.6,31.4,17.6,34.3,29.3,28.8,27.3,25.9,35.6,27.4,21.1,30.2,27.6,24.6,26.9,21.1,19.9,25.5,23.7,14.6) > 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] 14.2 14.4 9.8 26.2 11.8 11.0 21.3 14.5 23.1 17.1 22.0 21.5 24.4 21.4 15.9 [16] 18.8 13.4 17.8 15.4 14.0 15.1 13.7 9.1 21.0 11.7 15.7 31.6 16.6 21.4 33.3 [31] 20.1 26.9 25.0 16.5 22.6 23.6 11.4 17.2 8.8 16.6 15.2 12.6 10.9 15.0 12.9 [46] 9.6 23.1 17.5 23.2 21.6 30.4 16.6 33.3 28.3 27.8 26.3 24.9 34.6 26.4 20.1 [61] 29.2 26.6 23.6 25.9 20.1 18.9 24.5 22.7 13.6 > y [1] 19.0 18.5 18.5 23.5 16.3 14.8 27.2 17.1 25.9 10.6 15.4 21.6 29.3 14.3 12.1 [16] 23.0 13.6 24.0 18.7 17.7 6.4 29.7 27.3 13.8 16.5 22.4 23.6 15.9 21.9 19.0 [31] 22.5 17.3 18.7 20.4 13.6 19.3 10.7 24.8 16.5 21.1 21.2 15.7 22.2 15.6 18.5 [46] 15.3 28.7 21.6 21.5 17.3 23.8 16.5 18.6 24.0 12.3 20.7 22.3 15.3 15.6 22.2 [61] 20.2 19.2 16.1 14.0 19.6 16.6 17.2 23.5 13.5 > postscript(file="/var/www/html/rcomp/tmp/1dj4o1197402458.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.009 0.061 0.013 -0.039 -0.032 -0.176 0.104 -0.249 -0.055 -0.191 -0.129 -4 -3 -2 -1 0 1 2 3 4 5 6 -0.102 -0.037 -0.112 -0.193 0.172 -0.052 0.171 -0.122 0.207 0.099 0.034 7 8 9 10 11 12 13 14 15 0.144 0.085 0.012 0.037 0.134 -0.155 0.024 0.033 -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/2lbuc1197402458.tab") > > system("convert tmp/1dj4o1197402458.ps tmp/1dj4o1197402458.png") > > > proc.time() user system elapsed 1.164 0.289 1.216