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(81.28,69.39,67.63,51.25,103.97,133.83,162.37,172.91,163.01,151.50,111.73,88.58,74.29,63.98,61.18,76.48,107.98,124.97,145.57,140.20,143.84,138.80,104.06,74.70,60.18,55.16,35.62,56.18,85.44,114.08,133.64,67.14,95.58,89.37,75.24,69.18,54.49,57.50,62.16,76.67,110.04,127.38,156.47,167.56,153.54,124.08,100.97,79.17,68.13,61.77,54.31,60.30,84.18,104.05,114.66,105.55,96.61,70.94,63.91,58.61,44.53,49.58,57.39,76.76,104.57,125.41,143.11,136.35,135.15,131.70,96.87,70.63,66.29,63.49,62.97,66.43,101.49,127.69,133.21,158.72,148.61,134.31,100.99,75.16,59.74,52.87,52.07,57.38,79.43,101.40,120.19,134.38,135.97,113.83,84.38,70.28,65.96,56.36,49.57,68.33,90.32,117.06,134.69,131.67,129.25,118.77,88.44,76.79,75.28,73.89,76.24,88.58,105.83,115.84,127.76,131.75,119.63,93.38,75.55,51.79) > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '1' > par1 = '60' > #'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/10o161272557031.ps",horizontal=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/20o161272557031.ps",horizontal=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.00000000 0.82474846 0.49185188 0.07474526 -0.32565946 -0.60215112 [7] -0.71913493 -0.61590121 -0.35548191 -0.01549767 0.32098164 0.55883255 [13] 0.63593817 0.51283872 0.24150154 -0.10282362 -0.41866762 -0.64060641 [19] -0.69411395 -0.56306374 -0.30219416 0.01980245 0.32036059 0.54324719 [25] 0.60508870 0.49491889 0.26227253 -0.03578230 -0.28791760 -0.46770337 [31] -0.51291430 -0.40984353 -0.20335329 0.06818890 0.33055938 0.51433047 [37] 0.57145589 0.46608015 0.24408588 -0.02389151 -0.28296787 -0.45587934 [43] -0.50830692 -0.42609543 -0.24661814 -0.03566418 0.17971186 0.34019943 [49] 0.38301293 0.30825891 0.13415821 -0.07022087 -0.26315249 -0.39831429 [55] -0.42256241 -0.33766207 -0.16512134 0.04107372 0.23597343 0.37718475 [61] 0.41962606 > (mypacf <- c(rpacf$acf)) [1] 0.8247484573 -0.5890057549 -0.4024967406 -0.2495665319 -0.0457261121 [6] -0.1114151903 0.2220466449 0.0665316391 0.0507370664 0.0787552601 [11] 0.0524836375 -0.0689784492 -0.1836617783 -0.0993431507 -0.1132857689 [16] -0.0260462876 -0.1562445491 0.0118773853 0.0003713517 -0.0621442650 [21] -0.0719151036 0.0174501333 0.1041135887 -0.0829426745 -0.0338637976 [26] 0.0266610915 -0.0274615367 0.1309193619 -0.0789661583 -0.0508769459 [31] -0.0269262467 -0.0214455580 0.0467482808 0.1360928413 0.0077617097 [36] 0.0501674381 -0.0663482879 -0.0136399229 0.0633520310 -0.0302652073 [41] 0.0464746365 -0.0393588750 0.0120670201 -0.1104065610 -0.1150089490 [46] 0.0193247782 0.0226422697 -0.1387149831 -0.0187579193 -0.0251389956 [51] 0.0181969282 -0.0403373009 -0.0487052087 -0.0100514836 0.0046759216 [56] 0.0001018291 -0.0272766974 0.0044550129 -0.0216122078 0.0207139192 > 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/3m6ic1272557031.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/477g01272557031.tab") > > try(system("convert tmp/10o161272557031.ps tmp/10o161272557031.png",intern=TRUE)) character(0) > try(system("convert tmp/20o161272557031.ps tmp/20o161272557031.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.605 0.329 1.283