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(0.8833,0.87,0.8758,0.8858,0.917,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,1.2613,1.2646,1.2262,1.1985,1.2007,1.2138,1.2266,1.2176,1.2218,1.249,1.2991,1.3408,1.3119,1.3014,1.3201,1.2938,1.2694,1.2165,1.2037,1.2292,1.2256,1.2015,1.1786,1.1856,1.2103,1.1938,1.202,1.2271,1.277,1.265,1.2684,1.2811,1.2727,1.2611,1.2881,1.3213,1.2999,1.3074,1.3242,1.3516,1.3511,1.3419,1.3716,1.3622,1.3896,1.4227) > x <- c(18.33,22.6,24.9,24.8,23.8,25.1,26,27.4,27.3,24.3,28.4,24.4,30.3,31.5,29.8,25.3,25.6,26.7,27.4,28.6,26.3,28.5,28.4,29.4,30.3,29.6,32.1,32.4,36.3,34.6,36.3,40.3,40.4,45.4,39,35.7,40.2,41.7,49.1,49.6,47,52,53.1,57.8,57.9,54.6,51.3,52.7,58.5,56.6,57.9,64.4,65.1,64.6,68.9,68.8,59.3,55,55.4,58,50.8,54.6,58.6,63.6,64.5,66.9,71.9,68.7,74.2,75.8) > par7 = '0' > par6 = '0' > par5 = '0.0' > par4 = '12' > par3 = '1' > par2 = '0' > par1 = '0.0' > #'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] 0.502608651 0.332037640 0.179640590 0.019960743 0.072906771 [6] 0.061795719 0.052446475 0.042863704 -0.037317763 0.159427737 [11] 0.000000000 0.186411542 0.000000000 -0.062213185 0.074347637 [16] 0.247354027 0.349225390 0.259190117 0.281274728 0.342944751 [21] 0.429260846 0.465608018 0.317172501 0.194156014 0.282719283 [26] 0.342726767 0.425003005 0.425832411 0.258329860 0.407390037 [31] 0.380359187 0.360637307 0.359887600 0.184521778 0.274129106 [36] 0.389464767 0.375159759 0.305507856 0.164858350 0.261122799 [41] 0.325776948 0.216970692 0.260479250 0.174214969 0.023891921 [46] 0.007299302 0.076888842 0.095827555 -0.141130400 -0.035975102 [51] 0.012017312 -0.012500163 -0.009259325 0.034984556 0.042620087 [56] -0.001454546 0.224154844 0.320765107 > y [1] -0.124090385 -0.139262067 -0.132617525 -0.121264087 -0.086647807 [6] -0.045625178 -0.007830579 -0.022450129 -0.019386714 -0.019080888 [11] 0.001399021 0.018134570 0.060342229 0.074457911 0.077608979 [16] 0.081395638 0.146867076 0.153836345 0.128569101 0.107867371 [21] 0.115291044 0.156319754 0.157174674 0.205875310 0.232142935 [26] 0.234755867 0.203919956 0.181070775 0.182904720 0.193755934 [31] 0.204246114 0.196881708 0.200325181 0.222343231 0.261671717 [36] 0.293266451 0.271476468 0.263440608 0.277707491 0.257583625 [41] 0.238544348 0.195977883 0.185400146 0.206363551 0.203430520 [46] 0.183570776 0.164327293 0.170248976 0.190868263 0.177141497 [51] 0.183986836 0.204653662 0.244513577 0.235072122 0.237756264 [56] 0.247719084 0.241140628 0.231984356 0.253168264 0.278616100 [61] 0.262287338 0.268040432 0.280808504 0.301289076 0.300919075 [66] 0.294086520 0.315977942 0.309101040 0.329015936 0.352556475 > postscript(file="/var/www/html/rcomp/tmp/10d9a1197036163.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.181 0.163 0.143 0.119 0.134 0.143 0.149 0.145 0.152 0.155 0.136 -3 -2 -1 0 1 2 3 4 5 6 7 0.129 0.121 0.144 0.175 0.285 0.347 0.354 0.306 0.251 0.172 0.089 8 9 10 11 12 13 14 0.018 -0.070 -0.120 -0.200 -0.240 -0.326 -0.431 > 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/2msxg1197036163.tab") > > system("convert tmp/10d9a1197036163.ps tmp/10d9a1197036163.png") > > > proc.time() user system elapsed 0.651 0.181 0.775