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(126.64 + ,126.81 + ,125.84 + ,126.77 + ,124.34 + ,124.4 + ,120.48 + ,118.54 + ,117.66 + ,116.97 + ,120.11 + ,119.16 + ,116.9 + ,116.11 + ,114.98 + ,113.65 + ,115.82 + ,117.59 + ,118.57 + ,118.07 + ,114.98 + ,114.04 + ,115.02 + ,114.28 + ,115.04 + ,116.7 + ,119.21 + ,118.39 + ,116.5 + ,115.46 + ,117.59 + ,117.33 + ,116.2 + ,116.83 + ,118.99 + ,118.62 + ,121.09 + ,122.4 + ,123.76 + ,125.33 + ,123.23 + ,122.52 + ,123.64 + ,124.67 + ,124.71 + ,122.53 + ,124.4 + ,125.45 + ,125.35 + ,124.3 + ,127.03 + ,128.51 + ,128.1 + ,128.94 + ,129.67 + ,129.87 + ,131.12 + ,132.68 + ,132.24 + ,133.63 + ,129.91 + ,127.93 + ,131.17 + ,130.86 + ,133.48 + ,134.08 + ,136.02 + ,132.8 + ,132.37 + ,133.05 + ,132.57 + ,130.7 + ,130.5 + ,129.67 + ,127.8 + ,126.82 + ,126.85 + ,128.28 + ,128.3 + ,126.82 + ,125.08 + ,128.53 + ,130.34 + ,131.52 + ,132.59 + ,131.17 + ,132.72 + ,133.36 + ,132.82 + ,132.9 + ,130.9 + ,129.41 + ,128.67 + ,129.28 + ,130.91 + ,131.06 + ,130.84 + ,131.41 + ,133.22 + ,132.06 + ,132.48 + ,134.38 + ,135.22 + ,134.89 + ,136.09 + ,136.33 + ,136.32 + ,137.48 + ,136.53 + ,136.8 + ,138.03 + ,137.39 + ,137.55 + ,136.08 + ,134.78 + ,133.28 + ,133.57 + ,134.84 + ,133.02 + ,133.49 + ,133.77 + ,134.34 + ,134.5 + ,134.03 + ,135.51 + ,136.53 + ,135.95 + ,134.32 + ,132.44 + ,133.61 + ,131.02 + ,130.05 + ,128.21 + ,129.03 + ,130.34 + ,131.57 + ,132.63 + ,132.06 + ,134.44 + ,134.1 + ,132.49 + ,134.23 + ,134.92 + ,135.61 + ,134.53 + ,133.86 + ,133.89 + ,135.33 + ,135.86 + ,136.22 + ,137.38 + ,137.31 + ,136.89 + ,138.01 + ,136.72 + ,135.77 + ,137.52 + ,135.61 + ,132.94 + ,134.12 + ,132.55 + ,134.11 + ,134.19 + ,135.57 + ,135.05 + ,134.32 + ,133.61 + ,134.75 + ,133.1 + ,133.26 + ,131.63 + ,132.47 + ,132.45 + ,133.33 + ,133.57 + ,134.13 + ,133.92 + ,132.62 + ,132.3 + ,133.26 + ,132.6 + ,134.38 + ,134.17 + ,135.46 + ,135.09 + ,134.96 + ,133.85 + ,132.59 + ,131.15 + ,130.91 + ,131.07 + ,130.78 + ,129.95 + ,131.41 + ,131.21 + ,130.68 + ,130.46 + ,131.12 + ,132.99 + ,133.02 + ,133.39 + ,134.07 + ,135.6 + ,135.66 + ,135.53 + ,135.82 + ,136.9 + ,137.97 + ,138.09 + ,136.91 + ,134.76 + ,135.13 + ,134.66 + ,132.95 + ,132.25 + ,134.3 + ,134.3 + ,134.76 + ,134.81 + ,134.51 + ,135.11 + ,134.32 + ,133.51 + ,134.02 + ,132.76 + ,133.39 + ,132.05 + ,131.87 + ,133.03 + ,132.57 + ,132.1 + ,130.7 + ,129.2 + ,129.77 + ,131.02 + ,131.55 + ,133.17 + ,133.08 + ,133.24 + ,130.74 + ,129.91 + ,130.03 + ,131.13 + ,129.55 + ,130.22 + ,130.61 + ,129.27 + ,129.68 + ,130.1 + ,130.83 + ,130.95 + ,131.73 + ,131.86 + ,132.44 + ,132.35 + ,133.16 + ,133.62 + ,132.54 + ,132.69 + ,133.5 + ,133.36 + ,134.23 + ,132.41 + ,133.02 + ,132.88 + ,130.76 + ,130.33 + ,129.79 + ,128.65 + ,129.14 + ,127.35 + ,127.74 + ,126.31 + ,125.95 + ,126.36 + ,126.15 + ,125.6 + ,126.2 + ,126.73 + ,125.68 + ,122.49 + ,122.07 + ,123.4 + ,123.01 + ,123.03 + ,122.33 + ,122.42 + ,122.68 + ,124.69 + ,123.3 + ,124.17 + ,124.38 + ,123.19 + ,122.16 + ,120.66 + ,120.92 + ,120.67 + ,120.68 + ,121.1 + ,120.86 + ,121.48 + ,123.48 + ,121.72 + ,123.16 + ,123.84 + ,124.57 + ,124.3 + ,124.22 + ,124.43 + ,123.33 + ,122.86 + ,121.25 + ,122.16 + ,122.62 + ,123.44 + ,124 + ,124.75 + ,124.8 + ,125.93 + ,126.28 + ,126.04 + ,125.04 + ,123.76 + ,125.34 + ,126.99 + ,126.34 + ,127.42 + ,126.18 + ,125.3 + ,123.5 + ,125.32 + ,124.65 + ,124.03 + ,125.11 + ,125.46 + ,124.7 + ,124.48 + ,124.76 + ,125.81 + ,124.95 + ,123.66 + ,122.66 + ,119.34 + ,117.84 + ,120.97 + ,117.38 + ,118.06 + ,116.99 + ,115.55 + ,114.17 + ,115.32 + ,112.49 + ,111.93 + ,112.08 + ,111.63 + ,109.53 + ,111.35 + ,110.79 + ,113.06 + ,112.62 + ,110.65 + ,112.36 + ,113.74 + ,111.73 + ,109.86 + ,109.32 + ,109.99 + ,109.84 + ,111.13 + ,112.43 + ,111.77 + ,112.15 + ,112.89 + ,112.12 + ,113.1 + ,111.09 + ,110.76 + ,109.59 + ,109.99 + ,110.25 + ,108.31 + ,108.79 + ,108.14 + ,109.88 + ,109.93 + ,110.46 + ,109.56 + ,111.49 + ,111.85 + ,111.35 + ,110.95 + ,112.49 + ,113.11 + ,112.54 + ,112.84 + ,111.5 + ,111.52 + ,111.57 + ,112.48 + ,112.31 + ,113.79 + ,114.01 + ,113.64 + ,112.62 + ,113.27 + ,113.51 + ,112.92 + ,113.66 + ,113.14 + ,113.48 + ,113.23 + ,110.56 + ,109.5 + ,109.78 + ,109.49 + ,109.66 + ,109.93 + ,109.82 + ,108.54 + ,108.23 + ,106.19 + ,106.49 + ,107.15 + ,107.74 + ,107.54 + ,107.07 + ,107.54 + ,107.81 + ,108.38 + ,108.42 + ,106.86 + ,106.41 + ,106.46 + ,106.84 + ,107.69 + ,107.04 + ,111.04 + ,111.93 + ,111.98 + ,112.07 + ,112.05 + ,113.14 + ,112.49 + ,113.2 + ,113.52 + ,113.22 + ,113.85 + ,113.68 + ,114.26 + ,114.1 + ,114.8 + ,114.98 + ,115.1 + ,114.21 + ,114.24 + ,113.35 + ,114.23 + ,114.43 + ,114.28 + ,113 + ,113.16 + ,112.59 + ,113.65 + ,113.18 + ,113.21 + ,113.11 + ,112.78 + ,112.57 + ,111.87 + ,111.94 + ,113.18 + ,113.67 + ,115.15 + ,114.41 + ,112.88 + ,112.44 + ,113.48 + ,112.78 + ,112.59 + ,113.31 + ,113.21 + ,112.5 + ,113.72 + ,114.09 + ,113.97 + ,112.5 + ,111.28 + ,111.35 + ,110.92 + ,110.73 + ,109) > par8 = '' > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '1' > par1 = 'Default' > #'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 <- 5 > 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/1yigy1292617456.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/2rryj1292617456.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/3k1xm1292617456.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.0000000 0.9892826 0.9792048 0.9695935 0.9602419 0.9509962 0.9424424 [8] 0.9348834 0.9276461 0.9191774 0.9101485 0.9020710 0.8956754 0.8878039 [15] 0.8790267 0.8701017 0.8608079 0.8517726 0.8431474 0.8342808 0.8254764 [22] 0.8158291 0.8069736 0.7976632 0.7895686 0.7827075 0.7759244 > (mypacf <- c(rpacf$acf)) [1] 0.9892825882 0.0246122316 0.0176906668 0.0086392818 0.0014725154 [6] 0.0286489702 0.0447407832 0.0158155387 -0.0575863834 -0.0319780503 [11] 0.0382553377 0.0791570543 -0.0645302146 -0.0506169247 -0.0213090309 [16] -0.0253019915 0.0162592698 0.0216355966 -0.0264094853 -0.0214862580 [21] -0.0443743705 0.0452763782 -0.0176214143 0.0422907373 0.0511245052 [26] -0.0001512630 > 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/4njwa1292617456.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/58juf1292617456.tab") > > try(system("convert tmp/1yigy1292617456.ps tmp/1yigy1292617456.png",intern=TRUE)) character(0) > try(system("convert tmp/2rryj1292617456.ps tmp/2rryj1292617456.png",intern=TRUE)) character(0) > try(system("convert tmp/3k1xm1292617456.ps tmp/3k1xm1292617456.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.782 0.534 3.299