R version 2.12.0 (2010-10-15) Copyright (C) 2010 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(235.10 + ,280.70 + ,264.60 + ,240.70 + ,201.40 + ,240.80 + ,241.10 + ,223.80 + ,206.10 + ,174.70 + ,203.30 + ,220.50 + ,299.50 + ,347.40 + ,338.30 + ,327.70 + ,351.60 + ,396.60 + ,438.80 + ,395.60 + ,363.50 + ,378.80 + ,357.00 + ,369.00 + ,464.80 + ,479.10 + ,431.30 + ,366.50 + ,326.30 + ,355.10 + ,331.60 + ,261.30 + ,249.00 + ,205.50 + ,235.60 + ,240.90 + ,264.90 + ,253.80 + ,232.30 + ,193.80 + ,177.00 + ,213.20 + ,207.20 + ,180.60 + ,188.60 + ,175.40 + ,199.00 + ,179.60 + ,225.80 + ,234.00 + ,200.20 + ,183.60 + ,178.20 + ,203.20 + ,208.50 + ,191.80 + ,172.80 + ,148.00 + ,159.40 + ,154.50 + ,213.20 + ,196.40 + ,182.80 + ,176.40 + ,153.60 + ,173.20 + ,171.00 + ,151.20 + ,161.90 + ,157.20 + ,201.70 + ,236.40 + ,356.10 + ,398.30 + ,403.70 + ,384.60 + ,365.80 + ,368.10 + ,367.90 + ,347.00 + ,343.30 + ,292.90 + ,311.50 + ,300.90 + ,366.90 + ,356.90 + ,329.70 + ,316.20 + ,269.00 + ,289.30 + ,266.20 + ,253.60 + ,233.80 + ,228.40 + ,253.60 + ,260.10 + ,306.60 + ,309.20 + ,309.50 + ,271.00 + ,279.90 + ,317.90 + ,298.40 + ,246.70 + ,227.30 + ,209.10 + ,259.90 + ,266.00 + ,320.60 + ,308.50 + ,282.20 + ,262.70 + ,263.50 + ,313.10 + ,284.30 + ,252.60 + ,250.30 + ,246.50 + ,312.70 + ,333.20 + ,446.40 + ,511.60 + ,515.50 + ,506.40 + ,483.20 + ,522.30 + ,509.80 + ,460.70 + ,405.80 + ,375.00 + ,378.50 + ,406.80 + ,467.80 + ,469.80 + ,429.80 + ,355.80 + ,332.70 + ,378.00 + ,360.50 + ,334.70 + ,319.50 + ,323.10 + ,363.60 + ,352.10 + ,411.90 + ,388.60 + ,416.40 + ,360.70 + ,338.00 + ,417.20 + ,388.40 + ,371.10 + ,331.50 + ,353.70 + ,396.70 + ,447.00 + ,533.50 + ,565.40 + ,542.30 + ,488.70 + ,467.10 + ,531.30 + ,496.10 + ,444.00 + ,403.40 + ,386.30 + ,394.10 + ,404.10 + ,462.10 + ,448.10 + ,432.30 + ,386.30 + ,395.20 + ,421.90 + ,382.90 + ,384.20 + ,345.50 + ,323.40 + ,372.60 + ,376.00 + ,462.70 + ,487.00 + ,444.20 + ,399.30 + ,394.90 + ,455.40 + ,414.00 + ,375.50 + ,347.00 + ,339.40 + ,385.80 + ,378.80 + ,451.80 + ,446.10 + ,422.50 + ,383.10 + ,352.80 + ,445.30 + ,367.50 + ,355.10 + ,326.20 + ,319.80 + ,331.80 + ,340.90 + ,394.10 + ,417.20 + ,369.90 + ,349.20 + ,321.40 + ,405.70 + ,342.90 + ,316.50 + ,284.20 + ,270.90 + ,288.80 + ,278.80 + ,324.40 + ,310.90 + ,299.00 + ,273.00 + ,279.30 + ,359.20 + ,305.00 + ,282.10 + ,250.30 + ,246.50 + ,257.90 + ,266.50 + ,315.90 + ,318.40 + ,295.40 + ,266.40 + ,245.80 + ,362.80 + ,324.90 + ,294.20 + ,289.50 + ,295.20 + ,290.30 + ,272.00 + ,307.40 + ,328.70 + ,292.90 + ,249.10 + ,230.40 + ,361.50 + ,321.70 + ,277.20 + ,260.70 + ,251.00 + ,257.60 + ,241.80 + ,287.50 + ,292.30 + ,274.70 + ,254.20 + ,230.00 + ,339.00 + ,318.20 + ,287.00 + ,295.80 + ,284.00 + ,271.00 + ,262.70 + ,340.60 + ,379.40 + ,373.30 + ,355.20 + ,338.40 + ,466.90 + ,451.00 + ,422.00 + ,429.20 + ,425.90 + ,460.70 + ,463.60 + ,541.40 + ,544.20 + ,517.50 + ,469.40 + ,439.40 + ,549.00 + ,533.00 + ,506.10 + ,484.00 + ,457.00 + ,481.50 + ,469.50 + ,544.70 + ,541.20 + ,521.50 + ,469.70 + ,434.40 + ,542.60 + ,517.30 + ,485.70 + ,465.80 + ,447.00 + ,426.60 + ,411.60 + ,467.50 + ,484.50 + ,451.20 + ,417.40 + ,379.90 + ,484.70 + ,455.00 + ,420.80 + ,416.50 + ,376.30 + ,405.60 + ,405.80 + ,500.80 + ,514.00 + ,475.50 + ,430.10 + ,414.40 + ,538.00 + ,526.00 + ,488.50 + ,520.20 + ,504.40 + ,568.50 + ,610.60 + ,818.00 + ,830.90 + ,835.90 + ,782.00 + ,762.30 + ,856.90 + ,820.90 + ,769.60 + ,752.20 + ,724.40 + ,723.10 + ,719.50 + ,817.40 + ,803.30 + ,752.50 + ,689.00 + ,630.40 + ,765.50 + ,757.70 + ,732.20 + ,702.60 + ,683.30 + ,709.50 + ,702.20 + ,784.80 + ,810.90 + ,755.60 + ,656.80 + ,615.10 + ,745.30 + ,694.10 + ,675.70 + ,643.70 + ,622.10 + ,634.60 + ,588.00 + ,689.70 + ,673.90 + ,647.90 + ,568.80 + ,545.70 + ,632.60 + ,643.80 + ,593.10 + ,579.70 + ,546.00 + ,562.90 + ,572.50) > par8 = '' > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '1' > par3 = '1' > 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 <- 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/rcomp/tmp/1y6d61324050234.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/rcomp/tmp/2k2es1324050234.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/rcomp/tmp/3c01v1324050234.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.21014145 0.32513052 0.15327497 0.16725202 0.09915592 [7] 0.06451261 -0.05720318 -0.02324350 -0.08511473 -0.16842416 -0.07593925 [13] -0.47533352 -0.17921522 -0.16281883 -0.10664448 -0.14794499 -0.09147771 [19] -0.08974505 0.02732848 -0.01291336 0.02419850 -0.01874076 0.00956699 [25] -0.02222619 0.09197384 > (mypacf <- c(rpacf$acf)) [1] 0.210141452 0.293951835 0.049543616 0.049533524 0.012741411 [6] -0.020950202 -0.124687161 -0.032708542 -0.045437632 -0.146091580 [11] 0.023630726 -0.429139801 -0.023699546 0.150888957 0.029791302 [16] -0.044612443 -0.012037231 0.004647831 0.011303096 0.009822923 [21] -0.009817599 -0.156689911 0.012173236 -0.273086913 0.053216364 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/4xn3q1324050234.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/rcomp/tmp/5dm7y1324050234.tab") > > try(system("convert tmp/1y6d61324050234.ps tmp/1y6d61324050234.png",intern=TRUE)) character(0) > try(system("convert tmp/2k2es1324050234.ps tmp/2k2es1324050234.png",intern=TRUE)) character(0) > try(system("convert tmp/3c01v1324050234.ps tmp/3c01v1324050234.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.490 0.140 1.616