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(74.96,75.19,74.98,75.54,75.61,75.59,75.58,75.44,75.37,75.22,75.33,75.33,78.33,78.09,77.88,77.61,77.43,77.47,77.47,77.46,77.76,78.29,78.56,78.55,78.55,78.59,77.95,78.5,78.45,78.31,78.31,78.33,78.28,79.06,79.2,79.26,79.26,79.38,79.35,78.91,79.11,79.22,79.22,79.21,79.26,79.82,80.04,80.2,80.2,80.27,80.37,80.57,79.99,79.86,79.86,79.81,79.88,80.2,80.53,80.52,80.52,80.48,80.29,79.54,79.39,79.3,79.3,79.49,79.63,79.74,80.17,80.06) > 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/1k70a1321647394.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/29dfk1321647394.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/3dmc81321647394.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.0000000000 -0.0395309837 -0.0164169327 -0.1042630317 -0.1152040411 [6] -0.1291418076 -0.0894647186 -0.1049907347 0.0338197400 0.2189160882 [11] 0.0237175919 0.0780161252 0.0246946596 0.0819254844 -0.1694179097 [16] 0.0793169231 -0.0394208631 -0.0605984818 -0.0692685822 -0.0830009899 [21] -0.0467431257 0.1583288166 0.0109170071 0.0190678077 0.1024726765 [26] 0.0143213973 -0.0016215820 -0.1085646779 0.0107277084 -0.0103564403 [31] -0.0258057115 -0.0855046280 -0.0397628898 0.1114053183 0.0543867583 [36] 0.0301463288 -0.0223103008 0.0953684307 0.0005759098 0.0469751138 [41] -0.1387519995 -0.0712174532 -0.0465328304 -0.0425370532 -0.0243460043 [46] 0.0751073410 0.0846501360 0.0216238769 0.0316678956 > (mypacf <- c(rpacf$acf)) [1] -0.0395309837 -0.0180077721 -0.1058352160 -0.1257915642 -0.1492222594 [6] -0.1304924585 -0.1695588912 -0.0564675369 0.1496722485 -0.0247321460 [11] 0.0370411455 0.0412840184 0.1339382608 -0.1031901231 0.1530728936 [16] 0.0795347803 -0.0344770019 -0.0856826043 -0.0925289475 -0.1070721913 [21] 0.0731544373 -0.0593249368 0.0008157054 0.0120851910 0.0141842205 [26] 0.0177495787 -0.0221634750 0.0816229817 0.1039485226 -0.0362119198 [31] -0.0722968698 -0.0799849567 0.0690118002 -0.0131993778 0.0515249814 [36] -0.0718261438 0.0496661239 0.0133844379 0.1083602537 -0.0334026851 [41] -0.0178134768 -0.0438920820 -0.0285003587 -0.1002534585 0.0236544366 [46] -0.0088634833 -0.0059815223 -0.0550004501 > 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/4k3pq1321647394.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/5w6r61321647394.tab") > > try(system("convert tmp/1k70a1321647394.ps tmp/1k70a1321647394.png",intern=TRUE)) character(0) > try(system("convert tmp/29dfk1321647394.ps tmp/29dfk1321647394.png",intern=TRUE)) character(0) > try(system("convert tmp/3dmc81321647394.ps tmp/3dmc81321647394.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.928 0.179 1.110