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 = '0' > par6 = '1' > par5 = '0.0' > par4 = '12' > par3 = '0' > par2 = '1' > 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.0151716821 0.0066445427 0.0113534371 0.0346162808 0.0410226287 [6] 0.0377945989 -0.0146195497 0.0030634150 0.0003058260 0.0204799087 [11] 0.0167355493 0.0422076588 0.0141156819 0.0031510684 0.0037866589 [16] 0.0654714376 0.0069692689 -0.0252672439 -0.0207017299 0.0074236735 [21] 0.0410287099 0.0008549201 0.0487006354 0.0262676254 0.0026129315 [26] -0.0308359103 -0.0228491815 0.0018339452 0.0108512144 0.0104901798 [31] -0.0073644061 0.0034434731 0.0220180499 0.0393284859 0.0315947337 [36] -0.0217899826 -0.0080358600 0.0142668832 -0.0201238667 -0.0190392767 [41] -0.0425664646 -0.0105777368 0.0209634049 -0.0029330313 -0.0198597438 [46] -0.0192434828 0.0059216821 0.0206192872 -0.0137267660 0.0068453394 [51] 0.0206668259 0.0398599151 -0.0094414549 0.0026841415 0.0099628202 [56] -0.0065784559 -0.0091562720 0.0211839084 0.0254478360 -0.0163287620 [61] 0.0057530938 0.0127680713 0.0204805723 -0.0003700004 -0.0068325554 [66] 0.0218914215 -0.0068769018 0.0199148961 0.0235405387 > y [1] 4.703765e-02 -6.012610e-03 2.831580e-02 3.981330e-02 2.544344e-02 [6] -2.519953e-02 -1.265470e-02 2.932131e-02 -8.242546e-03 8.448253e-03 [11] 4.246574e-02 7.044239e-02 7.247817e-03 -5.109745e-02 -4.146548e-02 [16] 8.341510e-02 -2.704458e-05 -1.554719e-02 2.335617e-02 5.220621e-02 [21] 2.875185e-04 2.888423e-02 4.430204e-02 1.760158e-02 -2.355391e-02 [26] 1.461886e-03 -8.093368e-04 -5.260088e-02 1.926574e-02 1.510174e-02 [31] 6.251783e-03 1.088740e-02 3.618551e-02 4.551014e-02 8.613432e-03 [36] -4.252128e-02 -2.668918e-03 2.311626e-02 -1.163471e-02 -1.379243e-02 [41] 1.648451e-02 -1.119419e-02 3.017528e-02 4.089210e-02 2.986913e-02 [46] 1.645675e-02 6.412828e-02 7.225969e-02 1.253459e-02 3.826690e-03 [51] 9.314717e-02 1.039296e-01 -1.272246e-01 5.920505e-02 -3.270919e-03 [56] -5.191148e-02 -2.131950e-02 6.654823e-02 3.284409e-03 1.415242e-03 [61] 5.393513e-02 -1.325904e-02 3.562124e-02 -1.494593e-02 -2.098780e-02 [66] 1.428946e-02 -1.185907e-03 6.693321e-02 5.903910e-02 > postscript(file="/var/www/html/rcomp/tmp/1r5as1197035071.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 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -0.134 0.126 0.001 -0.083 0.013 0.039 -0.037 -0.015 -0.029 -0.028 -0.242 -4 -3 -2 -1 0 1 2 3 4 5 6 -0.048 -0.126 -0.221 -0.141 0.459 0.212 -0.194 0.007 0.230 0.125 -0.283 7 8 9 10 11 12 13 14 15 -0.034 0.038 -0.052 -0.093 0.205 0.173 0.022 0.047 -0.056 > 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/29xt81197035072.tab") > > system("convert tmp/1r5as1197035071.ps tmp/1r5as1197035071.png") > > > proc.time() user system elapsed 0.653 0.184 0.720