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(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) > x <- 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) > par7 = '1' > 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] 2.908539 3.117950 3.214868 3.210844 3.169686 3.222868 3.258097 3.310543 [9] 3.306887 3.190476 3.346389 3.194583 3.411148 3.449988 3.394508 3.230804 [17] 3.242592 3.284664 3.310543 3.353407 3.269569 3.349904 3.346389 3.380995 [25] 3.411148 3.387774 3.468856 3.478158 3.591818 3.543854 3.591818 3.696351 [33] 3.698830 3.815512 3.663562 3.575151 3.693867 3.730501 3.893859 3.903991 [41] 3.850148 3.951244 3.972177 4.056989 4.058717 4.000034 3.937691 3.964615 [49] 4.069027 4.036009 4.058717 4.165114 4.175925 4.168214 4.232656 4.231204 [57] 4.082609 4.007333 4.014580 4.060443 3.927896 4.000034 4.070735 4.152613 [65] 4.166665 4.203199 4.275276 4.229749 4.306764 4.328098 > postscript(file="/var/www/html/rcomp/tmp/1hrpm1197034652.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.375 0.375 0.349 0.244 0.185 0.110 0.070 0.013 -0.062 -0.132 -0.173 -3 -2 -1 0 1 2 3 4 5 6 7 -0.195 -0.233 -0.267 -0.349 -0.257 -0.197 -0.177 -0.221 -0.263 -0.266 -0.271 8 9 10 11 12 13 14 -0.258 -0.311 -0.336 -0.364 -0.324 -0.313 -0.357 > 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/27sy41197034652.tab") > > system("convert tmp/1hrpm1197034652.ps tmp/1hrpm1197034652.png") > > > proc.time() user system elapsed 0.653 0.180 0.721