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(25.2609 + ,16.8622 + ,13.3181 + ,12.5621 + ,14.2754 + ,12.2961 + ,10.0871 + ,13.5117 + ,13.9921 + ,13.6932 + ,14.4211 + ,15.3397 + ,16.5182 + ,15.2809 + ,15.6204 + ,15.5698 + ,15.9458 + ,16.4063 + ,17.55 + ,17.0353 + ,16.0591 + ,16.3643 + ,14.6527 + ,13.4664 + ,13.3266 + ,13.1823 + ,12.113 + ,13.354 + ,13.4537 + ,13.2715 + ,13.1959 + ,13.5542 + ,12.124 + ,10.967 + ,10.9201 + ,12.5971 + ,14.3177 + ,14.2471 + ,16.0926 + ,17.1334 + ,16.5866 + ,16.361 + ,15.8494 + ,15.5932 + ,16.6387 + ,16.8312 + ,16.5044 + ,16.5556 + ,16.7469 + ,15.9543 + ,15.5888 + ,14.3945 + ,13.8889 + ,12.9999 + ,14.1022 + ,19.6245 + ,24.7658 + ,25.9843 + ,22.9635 + ,19.6288 + ,17.3363 + ,13.311 + ,14.6359 + ,15.834 + ,16.2415 + ,15.9808 + ,16.9726 + ,16.8708 + ,16.923 + ,18.1138 + ,16.7716 + ,14.0299 + ,13.822 + ,14.2537 + ,14.3985 + ,15.2454 + ,15.6683 + ,16.1721 + ,14.8679 + ,14.1948 + ,14.7056 + ,15.3819 + ,15.5001 + ,14.7886 + ,14.563 + ,15.5528 + ,15.9781 + ,15.5139 + ,15.3603 + ,15.0512 + ,14.7874 + ,14.9624 + ,13.9188 + ,14.5146 + ,13.7115 + ,12.0738 + ,12.5688 + ,12.2547 + ,11.8741 + ,13.0261 + ,13.8681 + ,14.2137 + ,14.4743 + ,13.9764 + ,13.1558 + ,13.0991 + ,13.7831 + ,13.2546 + ,13.3426 + ,13.5011 + ,12.8245 + ,13.6596 + ,13.8754 + ,12.9011 + ,11.871 + ,12.3954 + ,12.8179 + ,12.1219 + ,12.6176 + ,13.6362 + ,13.5422 + ,13.362 + ,14.5735 + ,15.8357 + ,14.9927 + ,14.5078 + ,15.2648 + ,15.7163 + ,17.7969 + ,19.0408 + ,17.8571 + ,18.815 + ,19.0961 + ,17.6215 + ,17.0163 + ,15.8286 + ,16.7818 + ,15.8726 + ,16.6621 + ,17.5709 + ,16.9914 + ,18.0412 + ,16.9764 + ,15.7649 + ,14.3928 + ,13.5061 + ,12.7433 + ,13.017 + ,13.0171 + ,12.2412 + ,11.8878 + ,11.2511 + ,11.8583 + ,11.1202 + ,10.185 + ,8.7563 + ,9.5267 + ,9.4106 + ,11.878 + ,14.4228 + ,14.896 + ,15.6664 + ,18.147 + ,19.3069 + ,21.6807 + ,20.7934 + ,23.4241 + ,24.8273 + ,24.9276 + ,27.4256 + ,28.1746 + ,24.5615 + ,30.2532 + ,31.2514 + ,30.4733 + ,33.3047 + ,37.2103 + ,36.7711 + ,37.7163 + ,28.8488 + ,27.4682 + ,29.8793 + ,28.0598 + ,29.7733 + ,32.6926 + ,32.4803 + ,29.4168 + ,28.7054 + ,28.7614 + ,23.8075 + ,21.6987 + ,21.4691 + ,22.5709 + ,23.4546 + ,27.8976 + ,29.2965 + ,28.1191 + ,25.812 + ,25.931 + ,26.9925 + ,28.9213 + ,27.8898 + ,24.2473 + ,27.1056 + ,28.2833 + ,29.8076 + ,27.1826 + ,22.8764 + ,21.938 + ,23.3076 + ,24.9572 + ,26.4694 + ,23.9297 + ,24.7033 + ,24.646 + ,24.0496 + ,24.2096 + ,24.0717 + ,26.6673 + ,27.6457 + ,30.8791 + ,29.3278 + ,30.7268 + ,34.1204 + ,35.0205 + ,39.3565 + ,34.4724 + ,29.9762 + ,33.6008 + ,35.2464 + ,40.4137 + ,41.3922 + ,39.4243 + ,45.7259 + ,48.2549 + ,52.0461 + ,52.1871 + ,49.3474 + ,47.8653 + ,48.5179 + ,52.4815 + ,51.8171 + ,52.5811 + ,57.5617 + ,55.7091 + ,55.4378 + ,58.7493 + ,57.794 + ,50.282 + ,47.6976 + ,46.7381 + ,47.4282 + ,42.2269 + ,44.9066 + ,47.2648 + ,50.2325 + ,50.2504 + ,52.5685 + ,55.2325 + ,52.3674 + ,55.1692 + ,57.7252 + ,62.8232 + ,62.7599 + ,62.4387 + ,64.0862 + ,66.1209 + ,69.8474 + ,80.1039 + ,85.9319 + ,85.2843 + ,77.0383 + ,69.9981 + ,55.2039 + ,43.1188 + ,32.077 + ,34.2974 + ,34.5613 + ,36.5235 + ,39.0474 + ,42.8033 + ,49.5164 + ,46.459 + ,51.1313 + ,46.9331 + ,49.7654 + ,52.0729 + ,51.6425 + ,53.9784 + ,54.4891 + ,59.0665 + ,63.9929 + ,61.6167 + ,62.1816 + ,58.9178 + ,59.9151) > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '1' > par1 = '48' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), 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: Office for Research, Development, and Education > #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 (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/www/html/rcomp/tmp/1bx851292163373.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/www/html/rcomp/tmp/2bx851292163373.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.0000000 0.9801406 0.9514578 0.9172025 0.8827373 0.8498519 0.8224902 [8] 0.8028165 0.7863569 0.7727788 0.7604294 0.7471268 0.7329993 0.7169586 [15] 0.7055924 0.6950743 0.6890946 0.6886936 0.6925070 0.6987470 0.7053224 [22] 0.7129714 0.7148072 0.7091858 0.6946409 0.6765725 0.6510765 0.6235870 [29] 0.5977380 0.5757615 0.5560268 0.5368902 0.5203241 0.5053328 0.4906411 [36] 0.4782983 0.4653036 0.4517097 0.4352696 0.4202890 0.4082350 0.3972007 [43] 0.3894098 0.3841760 0.3820162 0.3782922 0.3740176 0.3676044 0.3573020 > (mypacf <- c(rpacf$acf)) [1] 0.9801405806 -0.2344039970 -0.1132095027 0.0280161662 0.0306246423 [6] 0.1085364231 0.1305598292 -0.0235607255 0.0162498401 0.0079732517 [11] -0.0325804939 0.0147711813 -0.0191989673 0.1524983299 -0.0113262814 [16] 0.0869952764 0.1087962089 0.0420656816 0.0348860524 0.0302910418 [21] 0.0552942363 -0.1053601865 -0.1010381342 -0.1332331566 0.0268607096 [26] -0.1739741834 0.0050770890 -0.0008923223 0.0239035870 -0.0304925265 [31] -0.0651603028 0.0278775570 0.0267656219 0.0310168729 0.0492255444 [36] -0.0468079479 -0.0814907878 -0.0834820719 -0.0443694366 0.0466261313 [41] -0.0463347920 0.0169006301 0.0132805253 0.0399915077 -0.0005689082 [46] 0.0310604282 0.0218899240 0.0076939180 > 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/3wy7t1292163373.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/4hynz1292163373.tab") > > try(system("convert tmp/1bx851292163373.ps tmp/1bx851292163373.png",intern=TRUE)) character(0) > try(system("convert tmp/2bx851292163373.ps tmp/2bx851292163373.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.605 0.340 1.327