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.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.2490,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.2020,1.2271,1.2770,1.2650,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) > x <- c(15761.3,16943.0,15070.3,13659.6,14768.9,14725.1,15998.1,15370.6,14956.9,15469.7,15101.8,11703.7,16283.6,16726.5,14968.9,14861.0,14583.3,15305.8,17903.9,16379.4,15420.3,17870.5,15912.8,13866.5,17823.2,17872.0,17420.4,16704.4,15991.2,16583.6,19123.5,17838.7,17209.4,18586.5,16258.1,15141.6,19202.1,17746.5,19090.1,18040.3,17515.5,17751.8,21072.4,17170.0,19439.5,19795.4,17574.9,16165.4,19464.6,19932.1,19961.2,17343.4,18924.2,18574.1,21350.6,18840.1,20304.8,21132.4,19753.9,18009.9,20390.4) > par7 = '1' > par6 = '0' > par5 = '1.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] 0.142102215 0.189446133 0.170179796 0.212734261 0.202085240 [6] 0.190261041 0.147583201 0.115211969 0.043207065 0.048333421 [11] 0.090904686 0.105299523 0.101190637 0.081328360 0.131640505 [16] 0.115043107 0.051891037 0.037728466 0.096193270 0.097418268 [21] 0.070164939 0.002753130 -0.023350592 0.011836265 0.003877493 [26] -0.048474533 -0.123104379 -0.158859912 -0.103981980 -0.110003800 [31] -0.120867304 -0.068261187 0.007785799 0.049557305 0.066085080 [36] 0.053092617 0.048159287 0.060852557 0.111817534 0.138794241 [41] 0.091657401 0.116165383 0.125083414 0.127700100 0.076150756 [46] 0.078964176 0.106102870 0.083392380 0.120288648 > y [1] -0.019181461 -0.018882037 0.001400098 0.018316653 0.062389935 [6] 0.077592080 0.081018030 0.085150756 0.159396064 0.167618772 [11] 0.138104793 0.114527621 0.122920755 0.170564095 0.171579894 [16] 0.231050914 0.264475175 0.267853120 0.228601231 0.200362725 [21] 0.202603129 0.215952193 0.229009478 0.219827144 0.224111392 [26] 0.251892456 0.303220398 0.346094021 0.316366213 0.305581586 [31] 0.324794501 0.297780993 0.272768068 0.218705323 0.205658887 [36] 0.231663410 0.227988885 0.203417923 0.180116019 0.187234108 [41] 0.212384232 0.195577786 0.203927197 0.229519806 0.280553867 [46] 0.268262628 0.271743967 0.284756027 0.276148173 0.264270480 [51] 0.291933553 0.326028349 0.304041634 0.311743169 0.329010611 [56] 0.357219907 0.356704622 0.347226804 0.377846837 0.368148406 [61] 0.396436821 > postscript(file="/var/www/html/rcomp/tmp/1lgau1196378181.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 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 0.041 0.050 -0.009 -0.080 -0.129 -0.163 -0.210 -0.275 -0.342 -0.407 -0.473 -2 -1 0 1 2 3 4 5 6 7 8 -0.562 -0.673 -0.751 -0.701 -0.601 -0.535 -0.448 -0.341 -0.219 -0.148 -0.116 9 10 11 12 13 -0.122 -0.105 -0.061 -0.021 0.020 > 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/2y8zg1196378182.tab") > > system("convert tmp/1lgau1196378181.ps tmp/1lgau1196378181.png") > > > proc.time() user system elapsed 0.639 0.179 0.722