R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(3.32,3.32,3.32,3.32,3.32,3.32,3.32,3.33,3.41,3.42,3.42,3.42,3.43,3.43,3.43,3.43,3.43,3.43,3.43,3.43,3.5,3.52,3.53,3.53,3.53,3.53,3.53,3.53,3.53,3.53,3.53,3.53,3.58,3.58,3.59,3.59,3.59,3.59,3.59,3.59,3.59,3.59,3.59,3.61,3.71,3.83,3.83,3.83,3.83,3.83,3.83,3.83,3.83,3.83,3.83,3.83,3.92,3.92,3.92,3.92,3.92,3.92,3.92,3.92,3.92,3.92,3.92,3.92,3.98,3.98,3.98,3.98) > par8 = '' > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > par3 = '1' > 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/wessaorg/rcomp/tmp/1pdhd1321444661.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/wessaorg/rcomp/tmp/2fd5y1321444661.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/wessaorg/rcomp/tmp/3saxo1321444661.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.00000000 0.24361320 -0.05787299 -0.13967547 -0.11368322 -0.13113391 [7] -0.13527043 -0.13512517 -0.10500740 -0.11151922 -0.08680839 0.20196671 [13] 0.51499483 0.10477630 -0.09019657 -0.12761851 -0.11319021 -0.11510770 [19] -0.11702519 -0.11894268 -0.09532574 -0.09977480 -0.05081093 0.16695529 [25] 0.42244497 0.11652073 -0.09398534 -0.08668293 -0.07019187 -0.06798385 [31] -0.06990134 -0.06738078 -0.04123227 -0.03871171 -0.02747130 0.03052494 [37] 0.34592836 0.16426965 -0.04417366 -0.07271948 -0.06432318 -0.06624067 [43] -0.06815817 -0.06595015 -0.02726881 -0.02440446 -0.01300779 0.01836013 [49] 0.22281218 > (mypacf <- c(rpacf$acf)) [1] 0.2436131981 -0.1246160169 -0.1009257837 -0.0634921217 -0.1160704216 [6] -0.1141120287 -0.1290921871 -0.1169090942 -0.1612576838 -0.1505729046 [11] 0.1542630243 0.3985169943 -0.1571807754 -0.0701752801 -0.0384118430 [16] -0.0733620513 -0.0609107014 -0.0582001360 -0.0768722031 -0.0871750129 [21] -0.0822260591 -0.0559126621 -0.0595097901 0.1428273849 -0.0333548674 [26] -0.1145527556 0.0024237714 -0.0282048203 -0.0365374883 -0.0155104261 [31] -0.0094853370 -0.0039043948 -0.0025908210 -0.0251666661 -0.2150532490 [36] 0.1118597365 0.0958325546 -0.0510848515 -0.0268852564 -0.0029712532 [41] -0.0390346730 -0.0327968723 -0.0041168391 0.0002378094 -0.0332040506 [46] 0.0754610876 -0.0487243977 -0.1244229171 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/434ql1321444661.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/wessaorg/rcomp/tmp/5fxgj1321444661.tab") > > try(system("convert tmp/1pdhd1321444661.ps tmp/1pdhd1321444661.png",intern=TRUE)) character(0) > try(system("convert tmp/2fd5y1321444661.ps tmp/2fd5y1321444661.png",intern=TRUE)) character(0) > try(system("convert tmp/3saxo1321444661.ps tmp/3saxo1321444661.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.000 0.191 1.311