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(179.257 + ,179.947 + ,179.094 + ,181.624 + ,184.954 + ,187.928 + ,187.151 + ,189.959 + ,192.492 + ,191.103 + ,191.737 + ,192.31 + ,192.013 + ,192.106 + ,192.141 + ,194.58 + ,196.421 + ,199.021 + ,198.136 + ,199.426 + ,200.997 + ,201.277 + ,201.663 + ,202.874 + ,204.256 + ,205.597 + ,205.471 + ,211.064 + ,212.856 + ,217.036 + ,219.302 + ,219.759 + ,221.388 + ,220.834 + ,221.788 + ,222.358 + ,222.972 + ,224.164 + ,224.915 + ,226.294 + ,224.69 + ,227.021 + ,229.284 + ,229.189 + ,230.032 + ,229.389 + ,231.053 + ,232.56 + ,232.681 + ,231.555 + ,231.428 + ,232.141 + ,234.939 + ,235.424 + ,235.471 + ,236.355 + ,238.693 + ,236.958 + ,237.06 + ,239.282 + ,238.252 + ,241.552 + ,236.23 + ,238.909 + ,240.723 + ,242.12 + ,242.1 + ,243.276 + ,244.677 + ,243.494 + ,244.902 + ,245.247 + ,245.578 + ,243.052 + ,238.121 + ,241.863 + ,241.203 + ,243.634 + ,242.351 + ,245.18 + ,246.126 + ,244.424 + ,245.166 + ,247.258 + ,245.094 + ,246.02 + ,243.082 + ,245.555 + ,243.685 + ,247.277 + ,245.029 + ,246.169 + ,246.778 + ,244.577 + ,246.048 + ,245.775 + ,245.328 + ,245.477 + ,241.903 + ,243.219 + ,248.088 + ,248.521 + ,247.389 + ,249.057 + ,248.916 + ,249.193 + ,250.768 + ,253.106 + ,249.829 + ,249.447 + ,246.755 + ,250.785 + ,250.14 + ,255.755 + ,254.671 + ,253.919 + ,253.741 + ,252.729 + ,253.81 + ,256.653 + ,255.231 + ,258.405 + ,251.061 + ,254.811 + ,254.895 + ,258.325 + ,257.608 + ,258.759 + ,258.621 + ,257.852 + ,260.56 + ,262.358 + ,260.812 + ,261.165 + ,257.164 + ,260.72 + ,259.581 + ,264.743 + ,261.845 + ,262.262 + ,261.631 + ,258.953 + ,259.966 + ,262.85 + ,262.204 + ,263.418 + ,262.752 + ,266.433 + ,267.722 + ,266.003 + ,262.971 + ,265.521 + ,264.676 + ,270.223 + ,269.508 + ,268.457 + ,265.814 + ,266.68 + ,263.018 + ,269.285 + ,269.829 + ,270.911 + ,266.844 + ,271.244 + ,269.907 + ,271.296 + ,270.157 + ,271.322 + ,267.179 + ,264.101 + ,265.518 + ,269.419 + ,268.714 + ,272.482 + ,268.351 + ,268.175 + ,270.674 + ,272.764 + ,272.599 + ,270.333 + ,270.846 + ,270.491 + ,269.16 + ,274.027 + ,273.784 + ,276.663 + ,274.525 + ,271.344 + ,271.115 + ,270.798 + ,273.911 + ,273.985 + ,271.917 + ,273.338 + ,270.601 + ,273.547 + ,275.363 + ,281.229 + ,277.793 + ,279.913 + ,282.5 + ,280.041 + ,282.166 + ,290.304 + ,283.519 + ,287.816 + ,285.226 + ,287.595 + ,289.741 + ,289.148 + ,288.301 + ,290.155 + ,289.648 + ,288.225 + ,289.351 + ,294.735 + ,305.333 + ,309.03 + ,310.215 + ,321.935 + ,325.734 + ,320.846 + ,323.023 + ,319.753 + ,321.753 + ,320.757 + ,324.479 + ,324.641 + ,322.767 + ,324.181 + ,321.389 + ,327.897 + ,334.287 + ,332.653 + ,334.819 + ,335.264 + ,339.622 + ,342.44 + ,346.585 + ,335.378 + ,337.01 + ,339.13 + ,341.193 + ,343.507 + ,348.915 + ,346.431 + ,348.322 + ,348.288 + ,346.597 + ,351.076 + ,355.215 + ,350.562 + ,355.266) > 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/wessaorg/rcomp/tmp/1kxh81324289419.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/2khc61324289419.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/3yc4e1324289419.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.9776667 0.9573665 0.9350572 0.9144072 0.8951442 0.8760228 [8] 0.8556916 0.8364043 0.8165308 0.7981234 0.7798240 0.7625399 0.7435516 [15] 0.7252655 0.7034222 0.6836301 0.6641339 0.6455503 0.6261731 0.6072603 [22] 0.5877038 0.5701895 0.5536699 0.5369775 > (mypacf <- c(rpacf$acf)) [1] 0.977666667 0.034739395 -0.053861791 0.022263540 0.025719003 [6] -0.007158960 -0.039205526 0.012568256 -0.018021036 0.017728516 [11] -0.004564296 0.011205009 -0.045035485 0.001319483 -0.084574042 [16] 0.023922755 0.004532521 0.001026675 -0.028568384 -0.002558112 [21] -0.016304189 0.025973210 0.018352412 -0.022889171 > 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/4cjzs1324289419.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/5ttgc1324289419.tab") > > try(system("convert tmp/1kxh81324289419.ps tmp/1kxh81324289419.png",intern=TRUE)) character(0) > try(system("convert tmp/2khc61324289419.ps tmp/2khc61324289419.png",intern=TRUE)) character(0) > try(system("convert tmp/3yc4e1324289419.ps tmp/3yc4e1324289419.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.911 0.174 1.084