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(600.58 + ,602.89 + ,549.64 + ,476.58 + ,469.19 + ,540.02 + ,587.12 + ,574.71 + ,623.85 + ,645.39 + ,615.15 + ,539.13 + ,603.24 + ,544.14 + ,536.36 + ,561.37 + ,570.83 + ,563.66 + ,515.46 + ,509.39 + ,526.94 + ,504.54 + ,465.72 + ,472.78 + ,453.41 + ,456.42 + ,407.65 + ,417.80 + ,400.15 + ,396.14 + ,425.40 + ,465.05 + ,565.15 + ,554.02 + ,527.61 + ,540.11 + ,602.28 + ,607.94 + ,520.70 + ,544.05 + ,564.13 + ,536.55 + ,544.57 + ,576.06 + ,555.20 + ,528.02 + ,526.32 + ,540.82 + ,533.61 + ,514.22 + ,522.10 + ,529.87 + ,527.42 + ,537.63 + ,513.46 + ,513.21 + ,527.32 + ,526.93 + ,540.06 + ,515.31 + ,490.06 + ,507.63 + ,480.66 + ,513.92 + ,499.70 + ,495.28 + ,452.26 + ,469.19 + ,440.63 + ,435.96 + ,417.73 + ,404.87 + ,421.91 + ,384.75 + ,409.63 + ,380.59 + ,404.85 + ,385.26 + ,373.41 + ,395.12 + ,432.87 + ,447.73 + ,401.91 + ,387.92 + ,377.51 + ,374.66 + ,377.40 + ,400.38 + ,429.18 + ,420.64 + ,427.39 + ,427.99 + ,432.69 + ,413.84 + ,390.97 + ,393.18 + ,408.37 + ,382.31 + ,376.13 + ,385.17 + ,398.23 + ,420.28 + ,420.89 + ,413.39 + ,397.34 + ,367.80 + ,373.07 + ,381.80 + ,385.16 + ,362.50 + ,377.22 + ,369.18 + ,376.74 + ,366.94 + ,357.76 + ,365.95 + ,345.59 + ,344.81 + ,358.99 + ,355.67 + ,352.57 + ,360.86 + ,340.21 + ,321.56 + ,319.21 + ,301.28 + ,295.81 + ,315.21 + ,311.70 + ,295.92 + ,293.79 + ,287.73 + ,292.31 + ,283.23 + ,318.46 + ,317.40 + ,314.78 + ,339.93 + ,328.29 + ,317.46 + ,296.54 + ,306.94 + ,300.02 + ,280.23 + ,292.65 + ,296.25 + ,289.08 + ,287.43 + ,277.98 + ,266.25 + ,266.37 + ,247.22 + ,246.10 + ,271.03 + ,274.35 + ,276.29 + ,268.08 + ,276.63 + ,272.45 + ,276.36 + ,298.83 + ,320.92 + ,349.04 + ,322.99 + ,295.04 + ,319.37 + ,324.63 + ,339.90 + ,339.85 + ,332.66 + ,332.07 + ,317.71 + ,325.43 + ,316.45 + ,313.44 + ,310.46 + ,312.21 + ,295.69 + ,307.54 + ,302.60 + ,288.98 + ,281.13 + ,276.01 + ,275.15 + ,277.27 + ,273.59 + ,270.56 + ,286.55 + ,280.07 + ,275.80 + ,285.34 + ,283.19 + ,308.44 + ,301.39 + ,298.99 + ,306.65 + ,305.04 + ,297.07 + ,290.54 + ,291.85 + ,295.36 + ,293.65 + ,291.83 + ,293.33 + ,287.84 + ,313.96 + ,298.87 + ,301.34 + ,300.15 + ,297.56 + ,306.71 + ,299.08 + ,300.19 + ,275.67 + ,267.61 + ,265.49 + ,266.11 + ,273.22 + ,272.63 + ,281.99 + ,269.60 + ,265.28 + ,266.59 + ,257.87 + ,249.87 + ,246.32 + ,251.70 + ,247.93 + ,247.43 + ,256.62 + ,262.89 + ,264.16 + ,259.75 + ,251.82 + ,247.44 + ,242.02 + ,252.07 + ,290.39 + ,283.82 + ,279.99 + ,280.68 + ,304.87 + ,296.86 + ,295.62 + ,304.04 + ,300.60 + ,299.61 + ,303.41 + ,313.88 + ,316.14 + ,311.05 + ,303.86 + ,283.10 + ,284.38 + ,289.38 + ,291.92 + ,311.66 + ,316.46 + ,310.94 + ,302.71 + ,311.31 + ,312.38 + ,310.77 + ,308.94 + ,319.05 + ,339.77 + ,335.61 + ,341.44 + ,343.23 + ,335.31 + ,315.68 + ,317.35 + ,325.56 + ,322.59 + ,318.61 + ,326.54 + ,336.02 + ,333.15 + ,314.95 + ,302.48 + ,307.31 + ,305.50 + ,308.57 + ,322.58 + ,337.09 + ,323.81 + ,333.06 + ,331.90 + ,327.90 + ,319.93 + ,331.51 + ,336.42 + ,319.77 + ,323.20 + ,324.51 + ,328.34 + ,331.88 + ,336.45 + ,337.95 + ,330.75 + ,323.87 + ,325.26 + ,328.73 + ,331.72 + ,332.54 + ,354.25 + ,352.69 + ,356.15 + ,372.50 + ,390.90 + ,404.65 + ,430.04 + ,453.54 + ,464.98 + ,463.31 + ,497.20 + ,528.62 + ,470.91 + ,499.53 + ,493.51 + ,469.97 + ,464.41 + ,487.15 + ,476.45 + ,484.91 + ,509.61 + ,495.19 + ,504.75 + ,493.43 + ,488.58 + ,484.82 + ,488.46 + ,512.32 + ,530.29 + ,549.38 + ,551.45 + ,604.41 + ,625.29 + ,623.56 + ,577.42 + ,572.28 + ,571.69 + ,596.28 + ,560.00 + ,577.93 + ,606.51 + ,597.31 + ,607.58 + ,648.14 + ,737.48 + ,708.73 + ,674.01 + ,679.90 + ,674.93 + ,663.38 + ,665.69 + ,684.21 + ,703.71 + ,755.42 + ,772.43) > 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 <- 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/1f4d61293207176.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/2pdd91293207176.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/3pdd91293207176.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.9658191 0.9324149 0.9096178 0.8914569 0.8715354 0.8523968 [8] 0.8367528 0.8167965 0.7939752 0.7677589 0.7425829 0.7222546 0.7016088 [15] 0.6854737 0.6722591 0.6590306 0.6441136 0.6284109 0.6187874 0.6105844 [22] 0.5980739 0.5840286 0.5707872 0.5576792 0.5457080 > (mypacf <- c(rpacf$acf)) [1] 0.965819120 -0.005828788 0.140704531 0.061535948 -0.010143272 [6] 0.022931142 0.044936516 -0.067344234 -0.037307648 -0.077636575 [11] -0.021941321 0.040179794 -0.021112684 0.071217659 0.045353322 [16] 0.014280785 0.004357530 -0.003842211 0.078633184 0.020803738 [21] -0.058432176 -0.024767730 -0.024740906 -0.026342390 0.024846620 > 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/4tete1293207176.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/5ew9k1293207176.tab") > > try(system("convert tmp/1f4d61293207176.ps tmp/1f4d61293207176.png",intern=TRUE)) character(0) > try(system("convert tmp/2pdd91293207176.ps tmp/2pdd91293207176.png",intern=TRUE)) character(0) > try(system("convert tmp/3pdd91293207176.ps tmp/3pdd91293207176.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.716 0.505 2.421