R version 2.9.0 (2009-04-17) Copyright (C) 2009 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. > x <- c(11974 + ,10106 + ,12069 + ,11412 + ,11180 + ,10508 + ,11288 + ,10928 + ,10199 + ,11030 + ,11234 + ,13747 + ,13912 + ,12376 + ,12264 + ,11675 + ,11271 + ,10672 + ,10933 + ,10379 + ,10187 + ,10747 + ,10970 + ,12175 + ,14200 + ,11676 + ,11258 + ,10872 + ,11148 + ,10690 + ,10684 + ,11658 + ,10178 + ,10981 + ,10773 + ,11665 + ,11359 + ,10716 + ,12928 + ,12317 + ,11641 + ,10459 + ,10953 + ,10703 + ,10703 + ,11101 + ,11334 + ,13268 + ,13145 + ,12334 + ,13153 + ,11289 + ,11374 + ,10914 + ,11299 + ,11284 + ,10694 + ,11077 + ,11104 + ,12820 + ,14915 + ,11773 + ,11608 + ,11468 + ,11511 + ,11200 + ,11164 + ,10960 + ,10667 + ,11556 + ,11372 + ,12333 + ,13102 + ,11115 + ,12572 + ,11557 + ,12059 + ,11420 + ,11185 + ,11113 + ,10706 + ,11523 + ,11391 + ,12634 + ,13469 + ,11735 + ,13281 + ,11968 + ,11623 + ,11084 + ,11509 + ,11134 + ,10438 + ,11530 + ,11491 + ,13093 + ,13106 + ,11305 + ,13113 + ,12203 + ,11309 + ,11088 + ,11234 + ,11619 + ,10942 + ,11445 + ,11291 + ,13281 + ,13726 + ,11300 + ,11983 + ,11092 + ,11093 + ,10692 + ,10786 + ,11166 + ,10553 + ,11103 + ,10969 + ,12090 + ,12544 + ,12264 + ,13783 + ,11214 + ,11453 + ,10883 + ,10381 + ,10348 + ,10024 + ,10805 + ,10796 + ,11907 + ,12261 + ,11377 + ,12689 + ,11474 + ,10992 + ,10764 + ,12164 + ,10409 + ,10398 + ,10349 + ,10865 + ,11630 + ,12221 + ,10884 + ,12019 + ,11021 + ,10799 + ,10423 + ,10484 + ,10450 + ,9906 + ,11049 + ,11281 + ,12485 + ,12849 + ,11380 + ,12079 + ,11366 + ,11328 + ,10444 + ,10854 + ,10434 + ,10137 + ,10992 + ,10906 + ,12367 + ,14371 + ,11695 + ,11546 + ,10922 + ,10670 + ,10254 + ,10573 + ,10239 + ,10253 + ,11176 + ,10719 + ,11817) > par8 = '' > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '1' > par1 = '48' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2009, 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: > #Technical description: > if (par1 == 'Default') { + par1 = 10*log10(length(x)) + } else { + par1 <- as.numeric(par1) + } > par2 <- as.numeric(par2) > par3 <- as.numeric(par3) > par4 <- as.numeric(par4) > par5 <- as.numeric(par5) > if (par6 == 'White Noise') par6 <- 'white' else par6 <- 'ma' > par7 <- as.numeric(par7) > if (par8 != '') par8 <- as.numeric(par8) > ox <- x > if (par8 == '') { + if (par2 == 0) { + x <- log(x) + } else { + x <- (x ^ par2 - 1) / par2 + } + } else { + x <- log(x,base=par8) + } > if (par3 > 0) x <- diff(x,lag=1,difference=par3) > if (par4 > 0) x <- diff(x,lag=par5,difference=par4) > postscript(file="/var/www/html/rcomp/tmp/16sx71293029944.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > op <- par(mfrow=c(2,1)) > plot(ox,type='l',main='Original Time Series',xlab='time',ylab='value') > if (par8=='') { + mytitle <- paste('Working Time Series (lambda=',par2,', d=',par3,', D=',par4,')',sep='') + mysub <- paste('(lambda=',par2,', d=',par3,', D=',par4,', CI=', par7, ', CI type=',par6,')',sep='') + } else { + mytitle <- paste('Working Time Series (base=',par8,', d=',par3,', D=',par4,')',sep='') + mysub <- paste('(base=',par8,', d=',par3,', D=',par4,', CI=', par7, ', CI type=',par6,')',sep='') + } > plot(x,type='l', main=mytitle,xlab='time',ylab='value') > par(op) > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2z2es1293029944.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > racf <- acf(x, par1, main='Autocorrelation', xlab='time lag', ylab='ACF', ci.type=par6, ci=par7, sub=mysub) > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/3z2es1293029944.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > rpacf <- pacf(x,par1,main='Partial Autocorrelation',xlab='lags',ylab='PACF',sub=mysub) > dev.off() null device 1 > (myacf <- c(racf$acf)) [1] 1.000000000 0.448259273 0.247015145 0.011347186 -0.221199647 [6] -0.288158237 -0.420247705 -0.280070454 -0.226617259 0.049524742 [11] 0.211162611 0.304622273 0.639989827 0.321435990 0.224033250 [16] 0.024448360 -0.174092355 -0.228746986 -0.359715244 -0.253924914 [21] -0.206147928 0.027433607 0.204504429 0.225549391 0.534443194 [26] 0.245017715 0.209645680 0.030743105 -0.198321054 -0.230072154 [31] -0.341410078 -0.214084794 -0.198066920 -0.000483901 0.175746984 [36] 0.292829422 0.589538785 0.240875862 0.169076553 -0.001950362 [41] -0.233372106 -0.278867687 -0.389768366 -0.238561884 -0.210855409 [46] -0.014017486 0.150815340 0.251544094 0.519784261 > (mypacf <- c(rpacf$acf)) [1] 0.4482592734 0.0576659571 -0.1492250286 -0.2427385472 -0.1128635494 [6] -0.2521968645 0.0028725552 -0.1116649838 0.1727318779 0.0750854315 [11] 0.0953316962 0.5001711047 -0.1766811380 0.0626605903 0.0467238118 [16] -0.0252046609 0.0565557580 -0.0369950106 -0.0283156031 0.0375662204 [21] -0.0356195457 0.1105943064 -0.0676968535 0.2155808751 -0.1510200285 [26] 0.0842978795 -0.0021520865 -0.1271401224 0.0338430320 -0.0112283421 [31] -0.0096266208 0.0049395875 -0.0979126260 0.0855655741 0.2174181080 [36] 0.1526044318 -0.1463696216 -0.0340283081 0.0333681142 -0.0970236227 [41] -0.0103969707 -0.0583734429 0.0004228028 -0.0573089598 -0.0655313892 [46] -0.0166496445 0.0258125004 -0.0356601625 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Autocorrelation Function',4,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Time lag k',header=TRUE) > a<-table.element(a,hyperlink('http://www.xycoon.com/basics.htm','ACF(k)','click here for more information about the Autocorrelation Function'),header=TRUE) > a<-table.element(a,'T-STAT',header=TRUE) > a<-table.element(a,'P-value',header=TRUE) > a<-table.row.end(a) > for (i in 2:(par1+1)) { + a<-table.row.start(a) + a<-table.element(a,i-1,header=TRUE) + a<-table.element(a,round(myacf[i],6)) + mytstat <- myacf[i]*sqrtn + a<-table.element(a,round(mytstat,4)) + a<-table.element(a,round(1-pt(abs(mytstat),lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/4dbu11293029944.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Partial Autocorrelation Function',4,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Time lag k',header=TRUE) > a<-table.element(a,hyperlink('http://www.xycoon.com/basics.htm','PACF(k)','click here for more information about the Partial Autocorrelation Function'),header=TRUE) > a<-table.element(a,'T-STAT',header=TRUE) > a<-table.element(a,'P-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:par1) { + a<-table.row.start(a) + a<-table.element(a,i,header=TRUE) + a<-table.element(a,round(mypacf[i],6)) + mytstat <- mypacf[i]*sqrtn + a<-table.element(a,round(mytstat,4)) + a<-table.element(a,round(1-pt(abs(mytstat),lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/563b41293029944.tab") > > try(system("convert tmp/16sx71293029944.ps tmp/16sx71293029944.png",intern=TRUE)) character(0) > try(system("convert tmp/2z2es1293029944.ps tmp/2z2es1293029944.png",intern=TRUE)) character(0) > try(system("convert tmp/3z2es1293029944.ps tmp/3z2es1293029944.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.755 0.490 9.996