R version 2.8.0 (2008-10-20) Copyright (C) 2008 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(14532.2,15167,16071.1,14827.5,15082,14772.7,16083,14272.5,15223.3,14897.3,13062.6,12603.8,13629.8,14421.1,13978.3,12927.9,13429.9,13470.1,14785.8,14292,14308.8,14013,13240.9,12153.4,14289.7,15669.2,14169.5,14569.8,14469.1,14264.9,15320.9,14433.5,13691.5,14194.1,13519.2,11857.9,14616,15643.4,14077.2,14887.5,14159.9,14643,17192.5,15386.1,14287.1,17526.6,14497,14398.3,16629.6,16670.7,16614.8,16869.2,15663.9,16359.9,18447.7,16889,16505,18320.9,15052.1,15699.8,18135.3,16768.7,18883,19021,18101.9,17776.1,21489.9,17065.3,18690,18953.1,16398.9,16895.7,18553,19270,19422.1,17579.4,18637.3,18076.7,20438.6,18075.2,19563,19899.2,19227.5,17789.6,19220.8,22058.6,21230.8,19504.4,23913.1,23165.7,23574.3,25002,22603.9,23408.6) > 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: Write here your technical program description (don't use hard returns!) > 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 (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/110ry1229963342.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > racf <- acf(x,par1,main='Autocorrelation',xlab='lags',ylab='ACF') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2nh7v1229963342.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.000000000 0.820542911 0.768954220 0.766372828 0.677311595 [6] 0.635757705 0.621521311 0.560434312 0.536103234 0.517443213 [11] 0.463068818 0.490255622 0.540186502 0.425217918 0.391180037 [16] 0.402225018 0.346243206 0.350337975 0.338855457 0.304288992 [21] 0.287398502 0.264581815 0.229465530 0.264657853 0.278920453 [26] 0.216599220 0.175508527 0.161385069 0.108067560 0.097536264 [31] 0.056407339 0.028525103 -0.002268751 -0.026687318 -0.054759550 [36] -0.031910348 -0.018125253 -0.070435844 -0.109145315 -0.120643216 [41] -0.147161191 -0.164301373 -0.184566481 -0.187766740 -0.212140390 [46] -0.246381642 -0.247374775 -0.249351868 -0.228059766 -0.271960761 [51] -0.304457522 -0.302453728 -0.319581714 -0.334187789 -0.327117672 [56] -0.332561062 -0.335011030 -0.342815740 -0.334281316 -0.317124064 [61] -0.280591489 > (mypacf <- c(rpacf$acf)) [1] 0.820542911 0.292809362 0.267498221 -0.117779579 0.007558722 [6] 0.063472399 -0.036863130 0.036976307 0.016412468 -0.053221077 [11] 0.188682672 0.259015380 -0.352048690 -0.189923701 0.070455399 [16] 0.116180506 0.124440223 -0.102978322 -0.054151448 -0.041067772 [21] 0.060728618 0.022201765 0.017569391 -0.019237828 0.008167686 [26] -0.146020340 -0.104446097 -0.068136342 0.030841658 -0.064837712 [31] 0.031508273 -0.044397886 0.070203562 -0.038863357 -0.020194525 [36] 0.013128352 -0.074891658 -0.079657494 -0.019466464 0.022269989 [41] -0.029992306 -0.035674852 0.056145067 -0.021168587 -0.081035176 [46] 0.012975835 -0.075411335 0.046358173 -0.041735187 -0.043667443 [51] -0.010943960 -0.011519942 0.032832895 0.019063787 -0.047111960 [56] 0.063239048 0.063203409 -0.032093252 -0.041507589 -0.011221383 > 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/3o8iw1229963343.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/4uf5w1229963343.tab") > > system("convert tmp/110ry1229963342.ps tmp/110ry1229963342.png") > system("convert tmp/2nh7v1229963342.ps tmp/2nh7v1229963342.png") > > > proc.time() user system elapsed 0.591 0.336 1.351