R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: i686-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(8.9634 + ,8.9522 + ,8.8682 + ,8.7331 + ,8.3188 + ,8.3462 + ,8.3087 + ,8.3836 + ,8.8412 + ,9.5001 + ,10.1883 + ,10.2931 + ,10.1945 + ,10.3014 + ,10.0675 + ,9.6715 + ,9.5019 + ,9.4597 + ,9.4362 + ,9.5919 + ,10.0167 + ,10.322 + ,11.166 + ,11.5454 + ,11.3712 + ,11.0723 + ,10.813 + ,10.3016 + ,10.4227 + ,10.3162 + ,10.4519 + ,10.8567 + ,11.2716 + ,11.4341 + ,12.1273 + ,11.9814 + ,11.8352 + ,11.9847 + ,11.545 + ,11.5285 + ,11.5539 + ,11.622 + ,11.6578 + ,11.6767 + ,11.8752 + ,13.2643 + ,14.2297 + ,14.308 + ,13.7915 + ,13.7633 + ,13.9775 + ,13.6478 + ,13.2247 + ,13.0971 + ,13.1039 + ,13.206 + ,13.7901 + ,14.6457 + ,15.5764 + ,15.6102 + ,15.8855 + ,16.0137 + ,15.6186 + ,15.384 + ,15.2751 + ,15.0912 + ,14.9222 + ,15.6231 + ,16.6737 + ,17.6805 + ,19.1919 + ,19.1711 + ,18.5658 + ,18.1285 + ,16.791 + ,16.9468 + ,17.3164 + ,17.1816 + ,16.7627 + ,17.239 + ,17.8838 + ,18.9038 + ,20.0274 + ,20.0087 + ,19.6366 + ,19.8163 + ,18.8602 + ,17.9206 + ,17.6889 + ,17.84 + ,17.678 + ,17.7258 + ,18.5865 + ,19.9804 + ,21.1584 + ,21.2921 + ,20.9445 + ,20.5731 + ,19.3274 + ,17.7866 + ,17.7483 + ,17.5648 + ,17.4763 + ,17.7264 + ,18.5736 + ,19.9236 + ,21.3286 + ,20.7249 + ,20.3334 + ,19.7658 + ,18.7569 + ,17.6963 + ,17.7978 + ,18.1771 + ,18.3738 + ,18.1996 + ,18.8443 + ,20.1001 + ,21.2458 + ,20.8381 + ,20.1967 + ,19.8159 + ,18.5784 + ,19.21 + ,19.3419 + ,19.12 + ,19.1563 + ,18.9783 + ,20.2913 + ,22.5439 + ,23.2821 + ,22.6191 + ,22.1599 + ,21.2766 + ,19.0846 + ,18.9096 + ,18.8095 + ,20.1164 + ,20.7762 + ,20.9044 + ,22.0026 + ,23.6401 + ,25.04 + ,24.7185 + ,24.1752 + ,24.1382 + ,22.3949 + ,21.3743 + ,21.4911 + ,21.2187 + ,21.2137 + ,21.6735 + ,22.5096 + ,24.3097 + ,25.7989 + ,25.4376 + ,23.878 + ,23.6966 + ,23.3544 + ,21.1993 + ,22.0431 + ,22.0203 + ,21.886 + ,21.9771 + ,23.0759 + ,24.9859 + ,26.2614 + ,26.1127 + ,25.6296 + ,25.2926 + ,22.8146 + ,22.2974 + ,22.8868 + ,22.4612 + ,22.3165 + ,22.7319 + ,23.2692 + ,24.9432 + ,27.8272 + ,27.4059 + ,26.6232 + ,26.8779 + ,25.105 + ,23.601 + ,23.5374 + ,23.5248 + ,22.9465 + ,23.6633 + ,25.5932 + ,27.7683 + ,29.4691 + ,28.3472 + ,28.3879 + ,27.9696 + ,26.0075 + ,24.2533 + ,24.4999 + ,23.8988 + ,23.6683 + ,23.9427 + ,26.0155 + ,28.9529 + ,30.302 + ,29.874 + ,28.2257 + ,28.0811 + ,26.3398 + ,25.4847 + ,25.4823 + ,24.9697 + ,25.2282 + ,25.9257 + ,28.7818 + ,27.9552 + ,33.3475 + ,32.7834 + ,31.6586 + ,31.6613 + ,29.1839 + ,28.8825 + ,27.6334 + ,27.7511 + ,27.3792 + ,27.7748 + ,31.4329 + ,33.2735 + ,35.0962 + ,34.9537 + ,31.8307 + ,30.9984 + ,28.629 + ,26.4379 + ,25.4408 + ,24.6681 + ,24.0994 + ,24.6043 + ,27.2492 + ,29.5511 + ,29.8522 + ,31.6989 + ,29.6357 + ,30.5197 + ,32.7823 + ,24.9942 + ,23.5187 + ,24.0249 + ,24.5692 + ,24.402 + ,26.7089 + ,31.6874 + ,32.8801 + ,32.7906 + ,30.8785 + ,30.3024 + ,28.3679 + ,25.6578 + ,25.1598 + ,24.6143 + ,24.528 + ,25.2905 + ,30.0016 + ,34.2728 + ,34.4408 + ,34.1907 + ,33.6636 + ,33.9073 + ,30.2175 + ,28.5274 + ,25.9505 + ,26.2398 + ,26.2819 + ,26.7362 + ,28.8395 + ,31.0951 + ,33.7015 + ,33.8091 + ,32.1126 + ,32 + ,29.122 + ,26.8124 + ,25.4654 + ,23.8331 + ,24.714 + ,28.3288 + ,29.6391 + ,32.4542 + ,33.5657 + ,33.1856 + ,33.297 + ,33.51 + ,31.3789 + ,29.4555 + ,27.2699 + ,27.2586 + ,27.8591 + ,29.6362 + ,30.9587 + ,31.8633 + ,33.8188 + ,33.7531 + ,33.6103 + ,32.9052 + ,29.5005 + ,27.3634 + ,27.2298 + ,26.5211 + ,26.5228 + ,27.2991 + ,29.1726 + ,30.297 + ,32.5287 + ,32.487 + ,32.4197 + ,30.854 + ,28.6995 + ,27.7881 + ,26.5609 + ,25.9431 + ,25.5578 + ,27.1275 + ,30.2556 + ,34.0976 + ,34.5614 + ,34.2948 + ,33.3418 + ,31.8187 + ,29.0818 + ,27.3444 + ,26.6233 + ,26.1869 + ,26.2953 + ,28.7043 + ,32.0653 + ,34.5401 + ,34.6636 + ,34.2557 + ,32.0526 + ,30.6892 + ,28.012 + ,26.1528 + ,23.2276 + ,24.244 + ,24.8141 + ,27.8632 + ,29.6233 + ,32.4245 + ,33.3417 + ,33.0442 + ,32.0526 + ,30.2182 + ,28.9292 + ,26.8221 + ,26.1032 + ,25.9792 + ,27.1443 + ,29.4993 + ,31.656 + ,33.3665 + ,35.0521 + ,34.4076 + ,33.069 + ,31.5816 + ,30.0695 + ,29.0035 + ,28.6813 + ,28.359 + ,30.0447 + ,31.5073 + ,34.16 + ,35.57 + ,36.42 + ,35.12 + ,33.14 + ,30.29 + ,28.2 + ,26.5 + ,25.47 + ,24.96 + ,25.6 + ,27.76 + ,30.13 + ,32.35 + ,32.8 + ,32.54 + ,29.78 + ,28.79 + ,26.8 + ,25.41 + ,24.34 + ,24.39 + ,25 + ,26.27 + ,27.88 + ,29.35 + ,29.83 + ,29.46) > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '1' > par3 = '1' > par2 = '1' > par1 = '48' > 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 (par2 == 0) { + x <- log(x) + } else { + x <- (x ^ par2 - 1) / par2 + } > 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/1m1581386211510.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=paste('(lambda=',par2,', d=',par3,', D=',par4,', CI=', par7, ', CI type=',par6,')',sep='')) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/23fj41386211510.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') > dev.off() null device 1 > (myacf <- c(racf$acf)) [1] 1.0000000000 -0.2079695284 -0.0972346461 -0.0351975283 0.0002425228 [6] 0.0935182273 -0.0806351612 0.0189232398 -0.0534218657 0.0123664524 [11] 0.1022683594 0.0728224366 -0.3869668752 -0.0012936819 0.0524926496 [16] 0.0529570287 0.0067246943 -0.0913159659 0.0637509684 -0.0453446948 [21] 0.0239248054 -0.0173128291 -0.0374403765 0.0457482511 -0.0891644687 [26] 0.1543602935 -0.1344178504 0.0265576127 0.0537987789 -0.1031860651 [31] 0.0783282836 -0.0416301355 -0.0378385912 0.0569965514 0.0430777049 [36] 0.0528316044 -0.0330099546 -0.0418898222 0.0890130253 -0.0022006800 [41] -0.0606609258 0.1155552420 -0.1278362524 0.1093590018 0.0445806467 [46] -0.0582193170 0.0142024127 -0.0946994452 0.0301324917 > (mypacf <- c(rpacf$acf)) [1] -0.2079695284 -0.1468368595 -0.0949945107 -0.0483790529 0.0722208320 [6] -0.0522255676 0.0091014049 -0.0589785718 -0.0180350410 0.0868353376 [11] 0.1343943160 -0.3561897551 -0.1568495417 -0.0811441976 -0.0153022558 [16] 0.0004241753 -0.0250380213 -0.0049956804 -0.0455326896 -0.0512630665 [21] -0.0531939947 0.0116851078 0.0993750815 -0.2485266079 0.0141262251 [26] -0.1743865109 0.0001844060 0.0552131370 -0.1349647579 0.0096329008 [31] -0.0534899895 -0.1591078050 -0.0042220042 0.0737421871 0.1462360879 [36] -0.1294883477 -0.0080376587 -0.0801335303 0.0521955232 0.0017748812 [41] 0.0419161880 -0.0720395281 0.0304282765 -0.0228910370 -0.0192170978 [46] 0.0825890481 0.0977058696 -0.1599833892 > 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/3z6nn1386211510.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/4nqeh1386211510.tab") > > try(system("convert tmp/1m1581386211510.ps tmp/1m1581386211510.png",intern=TRUE)) character(0) > try(system("convert tmp/23fj41386211510.ps tmp/23fj41386211510.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.605 0.767 3.342