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(9041.46,9476.91,9420.10,9690.65,10084.25,10344.12,10086.71,9959.87,10256.23,10172.04,10258.34,10703.35,11484.51,11568.05,10991.80,10545.34,11462.71,11462.40,11285.57,11552.26,12171.38,12174.88,12531.67,13099.33,13331.94,13021.59,13040.64,13030.09,12362.41,12602.89,12794.66,12874.90,13015.84,13495.45,14123.82,14246.00,13652.94,13616.55,13934.98,13773.79,13585.12,13810.92,13657.18,14075.57,14663.08,15107.66,15358.34,16375.51,17602.60,17824.63,17892.97,19639.74,21790.73,19187.52,20357.82,20291.34,19264.86,18858.49,20156.19,20222.50,20251.14,21373.38,21091.86,21856.72,21532.48,21085.27,21388.73,21363.38,22842.24,24231.43) > 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.23917851 0.19938867 0.15430384 0.08452255 0.12812436 0.10265387 [7] 0.11230620 0.14831707 0.17120197 0.17973203 0.20016801 0.20200431 [13] 0.14916349 0.11836176 0.17092109 0.21157724 0.07556126 0.09485404 [19] 0.12550298 0.10839859 0.06707978 0.10297778 0.11960369 0.08391508 [25] 0.02379222 0.04467722 0.06633159 0.05550621 0.09431466 0.09153343 [31] 0.06523749 0.08916099 0.11916569 0.11284931 0.08379592 0.13931076 [37] 0.25409174 0.26929524 0.25000567 0.35478755 0.47250957 0.32880048 [43] 0.39919972 0.36575352 0.27294994 0.22176131 0.27185279 0.21100892 [49] 0.14016447 0.18156501 0.16447929 0.10695336 -0.01192216 0.09431462 [55] 0.04939903 0.05148405 0.17032874 0.25068734 > y [1] 9.109576 9.156614 9.150601 9.178917 9.218730 9.244174 9.218974 [8] 9.206319 9.235641 9.227398 9.235846 9.278312 9.348754 9.356002 [15] 9.304905 9.263439 9.346854 9.346827 9.331280 9.354636 9.406843 [22] 9.407130 9.436014 9.480316 9.497918 9.474364 9.475826 9.475017 [29] 9.422416 9.441681 9.456783 9.463035 9.473922 9.510108 9.555618 [36] 9.564231 9.521710 9.519041 9.542158 9.530523 9.516730 9.533215 [43] 9.522021 9.552196 9.593088 9.622957 9.639414 9.703542 9.775802 [50] 9.788336 9.792163 9.885310 9.989240 9.862015 9.921220 9.917949 [57] 9.866038 9.844718 9.911267 9.914551 9.915966 9.969902 9.956642 [64] 9.992264 9.977318 9.956330 9.970619 9.969434 10.036367 10.095406 > postscript(file="/var/www/html/rcomp/tmp/1h6nz1197035271.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.380 0.443 0.495 0.487 0.470 0.447 0.411 0.353 0.308 0.224 0.145 -3 -2 -1 0 1 2 3 4 5 6 7 0.072 0.019 -0.011 -0.032 0.025 0.070 0.070 0.070 0.112 0.107 0.090 8 9 10 11 12 13 14 0.102 0.126 0.134 0.142 0.169 0.180 0.172 > 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/2sc231197035271.tab") > > system("convert tmp/1h6nz1197035271.ps tmp/1h6nz1197035271.png") > > > proc.time() user system elapsed 0.646 0.183 0.708