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(90.8,96.4,90,92.1,97.2,95.1,88.5,91,90.5,75,66.3,66,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(467037,460070,447988,442867,436087,431328,484015,509673,512927,502831,470984,471067,476049,474605,470439,461251,454724,455626,516847,525192,522975,518585,509239,512238,519164,517009,509933,509127,500857,506971,569323,579714,577992,565464,547344,554788,562325,560854,555332,543599,536662,542722,593530,610763,612613,611324,594167,595454,590865,589379,584428,573100,567456,569028,620735,628884,628232,612117,595404,597141,593408,590072,579799,574205,572775,572942,619567,625809,619916,587625,565742,557274) > par7 = '0' > par6 = '1' > par5 = '1' > par4 = '12' > par3 = '0' > par2 = '1' > 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] -6967 -12082 -5121 -6780 -4759 52687 25658 3254 -10096 -31847 [11] 83 4982 -1444 -4166 -9188 -6527 902 61221 8345 -2217 [21] -4390 -9346 2999 6926 -2155 -7076 -806 -8270 6114 62352 [31] 10391 -1722 -12528 -18120 7444 7537 -1471 -5522 -11733 -6937 [41] 6060 50808 17233 1850 -1289 -17157 1287 -4589 -1486 -4951 [51] -11328 -5644 1572 51707 8149 -652 -16115 -16713 1737 -3733 [61] -3336 -10273 -5594 -1430 167 46625 6242 -5893 -32291 -21883 [71] -8468 > y [1] 5.6 -6.4 2.1 5.1 -2.1 -6.6 2.5 -0.5 -15.5 -8.7 -0.3 2.4 [13] 2.2 13.3 6.2 0.5 -3.5 3.7 3.3 5.7 -3.0 -9.8 9.3 10.8 [25] 8.1 -9.1 -16.6 1.8 6.3 3.1 3.9 -9.9 7.1 0.7 2.8 5.0 [37] -0.5 7.5 1.5 12.5 -5.4 7.2 13.9 -1.2 18.6 -14.6 -12.1 14.0 [49] 5.1 23.2 0.4 -10.0 21.2 7.9 18.7 -0.7 -12.5 -11.0 5.3 20.0 [61] -8.2 4.1 25.0 2.0 -1.5 14.7 -2.4 -34.8 -14.5 1.9 10.0 > postscript(file="/var/www/html/rcomp/tmp/1uuvx1197370328.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.152 -0.297 0.106 0.195 0.076 0.013 -0.060 0.120 0.127 0.222 0.020 -4 -3 -2 -1 0 1 2 3 4 5 6 -0.259 -0.243 -0.304 0.123 0.226 0.158 0.032 -0.055 0.075 0.051 0.142 7 8 9 10 11 12 13 14 15 -0.034 -0.268 -0.201 -0.105 0.178 0.116 0.034 -0.056 -0.146 > 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/24xr71197370328.tab") > > system("convert tmp/1uuvx1197370328.ps tmp/1uuvx1197370328.png") > > > proc.time() user system elapsed 0.668 0.173 0.756