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(1.1608,1.1208,1.0883,1.0704,1.0628,1.0378,1.0353,1.0604,1.0501,1.0706,1.0338,1.0110,1.0137,0.9834,0.9643,0.9470,0.9060,0.9492,0.9397,0.9041,0.8721,0.8552,0.8564,0.8973,0.9383,0.9217,0.9095,0.8920,0.8742,0.8532,0.8607,0.9005,0.9111,0.9059,0.8883,0.8924,0.8833,0.8700,0.8758,0.8858,0.9170,0.9554,0.9922,0.9778,0.9808,0.9811,1.0014,1.0183,1.0622,1.0773,1.0807,1.0848,1.1582,1.1663,1.1372,1.1139,1.1222,1.1692,1.1702,1.2286) > x <- c(40.3,38.4,46.9,56.1,57.4,58.5,66.6,71.8,80.7,78.2,85.0,87.6,88.6,95.0,96.3,83.3,96.9,103.4,99.3,103.8,113.4,111.5,114.2,90.6,90.8,96.4,90.0,92.1,97.2,95.1,88.5,91.0,90.5,75.0,66.3,66.0,68.4,70.6,83.9,90.1,90.6,87.1,90.8,94.1,99.8,96.8,87.0,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) > 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] -1.9 8.5 9.2 1.3 1.1 8.1 5.2 8.9 -2.5 6.8 2.6 1.0 [13] 6.4 1.3 -13.0 13.6 6.5 -4.1 4.5 9.6 -1.9 2.7 -23.6 0.2 [25] 5.6 -6.4 2.1 5.1 -2.1 -6.6 2.5 -0.5 -15.5 -8.7 -0.3 2.4 [37] 2.2 13.3 6.2 0.5 -3.5 3.7 3.3 5.7 -3.0 -9.8 9.3 10.8 [49] 8.1 -9.1 -16.6 1.8 6.3 3.1 3.9 -9.9 7.1 0.7 2.8 > y [1] -0.0400 -0.0325 -0.0179 -0.0076 -0.0250 -0.0025 0.0251 -0.0103 0.0205 [10] -0.0368 -0.0228 0.0027 -0.0303 -0.0191 -0.0173 -0.0410 0.0432 -0.0095 [19] -0.0356 -0.0320 -0.0169 0.0012 0.0409 0.0410 -0.0166 -0.0122 -0.0175 [28] -0.0178 -0.0210 0.0075 0.0398 0.0106 -0.0052 -0.0176 0.0041 -0.0091 [37] -0.0133 0.0058 0.0100 0.0312 0.0384 0.0368 -0.0144 0.0030 0.0003 [46] 0.0203 0.0169 0.0439 0.0151 0.0034 0.0041 0.0734 0.0081 -0.0291 [55] -0.0233 0.0083 0.0470 0.0010 0.0584 > postscript(file="/var/www/html/rcomp/tmp/1pr2l1196282179.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 0.058 -0.078 -0.090 0.004 0.126 -0.108 -0.304 -0.171 -0.179 0.027 0.343 -3 -2 -1 0 1 2 3 4 5 6 7 0.071 -0.106 -0.143 -0.114 -0.003 -0.045 -0.092 -0.065 0.040 -0.167 0.236 8 9 10 11 12 13 14 0.096 -0.149 -0.102 -0.086 0.035 0.241 0.062 > 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/2utk41196282180.tab") > > system("convert tmp/1pr2l1196282179.ps tmp/1pr2l1196282179.png") > > > proc.time() user system elapsed 0.645 0.171 0.702