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(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) > x <- c(36845,35338,35022,34777,26887,23970,22780,17351,21382,24561,17409,11514,31514,27071,29462,26105,22397,23843,21705,18089,20764,25316,17704,15548,28029,29383,36438,32034,22679,24319,18004,17537,20366,22782,19169,13807,29743,25591,29096,26482,22405,27044,17970,18730,19684,19785,18479,10698,31956,29506,34506,27165,26736,23691,18157,17328,18205,20995,17382,9367) > 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] 36844 35337 35021 34776 26886 23969 22779 17350 21381 24560 17408 11513 [13] 31513 27070 29461 26104 22396 23842 21704 18088 20763 25315 17703 15547 [25] 28028 29382 36437 32033 22678 24318 18003 17536 20365 22781 19168 13806 [37] 29742 25590 29095 26481 22404 27043 17969 18729 19683 19784 18478 10697 [49] 31955 29505 34505 27164 26735 23690 18156 17327 18204 20994 17381 9366 > y [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 > postscript(file="/var/www/html/rcomp/tmp/1c6l41198088154.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.113 -0.119 -0.172 -0.153 -0.152 -0.112 -0.098 -0.080 -0.060 0.028 0.105 -3 -2 -1 0 1 2 3 4 5 6 7 0.180 0.278 0.276 0.197 0.101 -0.025 -0.104 -0.142 -0.190 -0.250 -0.168 8 9 10 11 12 13 14 -0.099 -0.028 0.024 0.072 0.106 0.056 -0.003 > 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/2vrq51198088154.tab") > > system("convert tmp/1c6l41198088154.ps tmp/1c6l41198088154.png") > > > proc.time() user system elapsed 1.164 0.294 1.217