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. Natural language support but running in an English locale 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(13,17,17,13,14,13,17,17,15,9,10,9,14,18,18,12,16,12,19,13,12,13,11,10,16,12,6,8,6,8,8,9,13,8,11,8,10,15,12,13,12,15,13,13,16,14,12,15,14,19,16,16,11,13,12,11,6,9,6,15,17,13,12,13,10,14,13,10,11,12,7,11) > x <- c(467037,460070,447988,442867,436087,431328,484015,509673,512927,502831,470984,471067,476049,474605,470439,461251,454724,455626,516847,525192,522975,518585,509239,512238,519164,517009,509933,509127,500857,506971,569323,579714,577992,565464,547344,554788,562325,560854,555332,543599,536662,542722,593530,610763,612613,611324,594167,595454,590865,589379,584428,573100,567456,569028,620735,628884,628232,612117,595404,597141,593408,590072,579799,574205,572775,572942,619567,625809,619916,587625,565742,557274) > par7 = '0' > par6 = '0' > par5 = '1' > par4 = '1' > par3 = '0' > 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] 467036 460069 447987 442866 436086 431327 484014 509672 512926 502830 [11] 470983 471066 476048 474604 470438 461250 454723 455625 516846 525191 [21] 522974 518584 509238 512237 519163 517008 509932 509126 500856 506970 [31] 569322 579713 577991 565463 547343 554787 562324 560853 555331 543598 [41] 536661 542721 593529 610762 612612 611323 594166 595453 590864 589378 [51] 584427 573099 567455 569027 620734 628883 628231 612116 595403 597140 [61] 593407 590071 579798 574204 572774 572941 619566 625808 619915 587624 [71] 565741 557273 > y [1] 12 16 16 12 13 12 16 16 14 8 9 8 13 17 17 11 15 11 18 12 11 12 10 9 15 [26] 11 5 7 5 7 7 8 12 7 10 7 9 14 11 12 11 14 12 12 15 13 11 14 13 18 [51] 15 15 10 12 11 10 5 8 5 14 16 12 11 12 9 13 12 9 10 11 6 10 > postscript(file="/var/www/html/rcomp/tmp/1ztbp1195838755.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 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 0.051 -0.012 -0.059 -0.047 -0.033 -0.047 -0.037 -0.048 0.019 0.065 0.036 -4 -3 -2 -1 0 1 2 3 4 5 6 -0.081 -0.185 -0.236 -0.230 -0.167 -0.158 -0.194 -0.218 -0.190 -0.069 0.009 7 8 9 10 11 12 13 14 15 -0.024 -0.117 -0.215 -0.237 -0.197 -0.147 -0.139 -0.156 -0.168 > 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/234b71195838755.tab") > > system("convert tmp/1ztbp1195838755.ps tmp/1ztbp1195838755.png") > > > proc.time() user system elapsed 1.252 0.294 1.316