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(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] 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/1lkey1197035448.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.003 -0.019 -0.057 -0.196 0.127 0.218 -0.065 -0.039 0.098 0.070 -0.190 -4 -3 -2 -1 0 1 2 3 4 5 6 0.116 0.023 -0.137 -0.087 0.216 0.018 -0.063 0.052 0.033 -0.057 -0.112 7 8 9 10 11 12 13 14 15 0.179 -0.120 -0.043 -0.050 -0.007 -0.130 -0.137 0.112 -0.046 > 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/27hei1197035448.tab") > > system("convert tmp/1lkey1197035448.ps tmp/1lkey1197035448.png") > > > proc.time() user system elapsed 0.620 0.177 0.729