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 = '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.209410844 0.096917897 -0.004024150 -0.041158072 0.053182265 [6] 0.035228692 0.052446475 -0.003656311 -0.116410352 0.155912795 [11] -0.151806013 0.216564580 0.038839833 -0.055479152 -0.163703998 [16] 0.011787956 0.042071214 0.025879448 0.042863704 -0.083837779 [21] 0.080335148 -0.003514942 0.034605529 0.030153038 -0.023373351 [26] 0.081081669 0.009302393 0.113659318 -0.047964059 0.047964059 [31] 0.104533728 0.002478316 0.116682320 -0.151950459 -0.088410957 [36] 0.118716307 0.036634133 0.163357906 0.010131799 -0.053843232 [41] 0.101096117 0.020933210 0.084811847 0.001728609 -0.058683502 [46] -0.062343131 0.026924703 0.104411299 -0.033017769 0.022708399 [51] 0.106396249 0.010810916 -0.007710138 0.064441767 -0.001452433 [56] -0.148594439 -0.075276121 0.007246409 0.045863417 -0.132546656 [61] 0.072137528 0.070700814 0.081878774 0.014051753 0.036533743 [66] 0.072077298 -0.045527065 0.077014951 0.021334142 > y [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 > postscript(file="/var/www/html/rcomp/tmp/19snu1197035899.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.106 -0.057 -0.149 -0.035 0.337 0.022 -0.062 -0.168 0.064 -0.103 -0.002 -4 -3 -2 -1 0 1 2 3 4 5 6 0.280 -0.063 -0.008 -0.169 0.094 -0.098 -0.066 0.059 -0.015 -0.106 -0.054 7 8 9 10 11 12 13 14 15 0.174 0.116 -0.084 -0.016 -0.142 -0.079 0.001 0.092 0.175 > 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/266fo1197035900.tab") > > system("convert tmp/19snu1197035899.ps tmp/19snu1197035899.png") > > > proc.time() user system elapsed 0.664 0.183 0.746