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(88.95,88.81,88.90,90.15,90.92,90.78,90.81,89.46,89.22,88.89,89.41,89.59,90.25,90.20,90.27,90.71,91.18,90.66,89.72,88.72,88.91,89.15,89.15,89.08,89.28,89.47,89.53,90.72,90.91,91.38,91.49,90.90,90.93,90.57,91.28,90.83,91.50,91.58,92.49,94.16,95.46,95.80,95.32,95.41,95.35,95.68,95.59,94.96,96.92,96.06,96.59,96.67,97.27,96.38,96.47,96.05,96.76,96.51,96.55,95.97,97.00,97.46,97.90,98.42,98.54,99.00,98.94,99.02,100.07,98.72,98.73,98.04,99.08,99.22,99.57,100.44,100.84,100.75,100.49,99.98,99.96,99.76,100.11,99.79,100.29,101.12,102.65,102.71,103.39,102.80,102.07,102.15,101.21,101.27,101.86,101.65,101.94,102.62,102.71,103.39,104.51,104.09,104.29,104.57,105.39,105.15,106.13,105.46,106.47,106.62,106.52,108.04,107.15,107.32,107.76,107.26,107.89) > x <- c(88.74,88.92,88.77,89.17,89.61,89.52,89.74,89.40,89.36,89.38,89.36,89.29,89.59,89.79,89.86,90.21,90.37,90.19,90.33,90.22,90.42,90.54,90.73,91.02,91.19,91.53,91.88,92.06,92.32,92.67,92.85,92.82,93.46,93.23,93.54,93.29,93.20,93.60,93.81,94.62,95.22,95.38,95.31,95.30,95.57,95.42,95.53,95.33,95.90,96.06,96.31,96.34,96.49,96.22,96.53,96.50,96.77,96.66,96.58,96.63,97.06,97.73,98.01,97.76,97.49,97.77,97.96,98.23,98.51,98.19,98.37,98.31,98.60,98.97,99.11,99.64,100.03,99.98,100.32,100.44,100.51,101.00,100.88,100.55,100.83,101.51,102.16,102.39,102.54,102.85,103.47,103.57,103.69,103.50,103.47,103.45,103.48,103.93,103.89,104.40,104.79,104.77,105.13,105.26,104.96,104.75,105.01,105.15,105.20,105.77,105.78,106.26,106.13,106.12,106.57,106.44,106.54) > par7 = '1' > par6 = '0' > par5 = '1' > par4 = '1' > par3 = '1' > par2 = '0' > 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.14 0.09 1.25 0.77 -0.14 0.03 -1.35 -0.24 -0.33 0.52 0.18 0.66 [13] -0.05 0.07 0.44 0.47 -0.52 -0.94 -1.00 0.19 0.24 0.00 -0.07 0.20 [25] 0.19 0.06 1.19 0.19 0.47 0.11 -0.59 0.03 -0.36 0.71 -0.45 0.67 [37] 0.08 0.91 1.67 1.30 0.34 -0.48 0.09 -0.06 0.33 -0.09 -0.63 1.96 [49] -0.86 0.53 0.08 0.60 -0.89 0.09 -0.42 0.71 -0.25 0.04 -0.58 1.03 [61] 0.46 0.44 0.52 0.12 0.46 -0.06 0.08 1.05 -1.35 0.01 -0.69 1.04 [73] 0.14 0.35 0.87 0.40 -0.09 -0.26 -0.51 -0.02 -0.20 0.35 -0.32 0.50 [85] 0.83 1.53 0.06 0.68 -0.59 -0.73 0.08 -0.94 0.06 0.59 -0.21 0.29 [97] 0.68 0.09 0.68 1.12 -0.42 0.20 0.28 0.82 -0.24 0.98 -0.67 1.01 [109] 0.15 -0.10 1.52 -0.89 0.17 0.44 -0.50 0.63 > y [1] 87.95 87.81 87.90 89.15 89.92 89.78 89.81 88.46 88.22 87.89 [11] 88.41 88.59 89.25 89.20 89.27 89.71 90.18 89.66 88.72 87.72 [21] 87.91 88.15 88.15 88.08 88.28 88.47 88.53 89.72 89.91 90.38 [31] 90.49 89.90 89.93 89.57 90.28 89.83 90.50 90.58 91.49 93.16 [41] 94.46 94.80 94.32 94.41 94.35 94.68 94.59 93.96 95.92 95.06 [51] 95.59 95.67 96.27 95.38 95.47 95.05 95.76 95.51 95.55 94.97 [61] 96.00 96.46 96.90 97.42 97.54 98.00 97.94 98.02 99.07 97.72 [71] 97.73 97.04 98.08 98.22 98.57 99.44 99.84 99.75 99.49 98.98 [81] 98.96 98.76 99.11 98.79 99.29 100.12 101.65 101.71 102.39 101.80 [91] 101.07 101.15 100.21 100.27 100.86 100.65 100.94 101.62 101.71 102.39 [101] 103.51 103.09 103.29 103.57 104.39 104.15 105.13 104.46 105.47 105.62 [111] 105.52 107.04 106.15 106.32 106.76 106.26 106.89 > postscript(file="/var/www/html/rcomp/tmp/1ooa71195989763.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 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 0.045 0.074 0.080 0.071 0.078 0.059 0.037 0.052 0.033 0.061 0.078 -6 -5 -4 -3 -2 -1 0 1 2 3 4 0.083 0.129 0.115 0.128 0.114 0.106 0.010 0.013 -0.009 0.024 0.050 5 6 7 8 9 10 11 12 13 14 15 0.056 0.065 0.053 0.050 0.043 0.043 0.031 0.004 0.002 -0.010 0.015 16 17 0.024 0.025 > 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/2niso1195989763.tab") > > system("convert tmp/1ooa71195989763.ps tmp/1ooa71195989763.png") > > > proc.time() user system elapsed 0.656 0.169 0.735