R version 2.7.0 (2008-04-22) 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(13139.7,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,21968.9,21131.5,19484.6,22404.1,21099,22486.5,23707.5,21897.5,23326.4,23765.4,20444) > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '' > par6 = '' > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '-0.6' > par1 = '60' > ylab = '' > xlab = '' > main = '' > #'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/11do21229865616.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/20s331229865616.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.821474343 0.751391250 0.774275892 0.713740886 [6] 0.688724617 0.709381283 0.614825583 0.607876559 0.606920210 [11] 0.524114461 0.563499157 0.632916739 0.500573179 0.453686698 [16] 0.453133221 0.413232485 0.414231761 0.406051345 0.337113603 [21] 0.338614060 0.326230264 0.261949457 0.303595895 0.316716741 [26] 0.230086049 0.186518430 0.166707219 0.135893073 0.128165234 [31] 0.086023984 0.045354690 0.033249242 -0.006358637 -0.050067807 [36] -0.021336230 -0.011855241 -0.072532364 -0.118940619 -0.126466760 [41] -0.147196722 -0.160953729 -0.194805560 -0.215802049 -0.217685570 [46] -0.247284229 -0.276573381 -0.270860538 -0.254450540 -0.291018058 [51] -0.334410349 -0.339268798 -0.335092531 -0.348869363 -0.358487861 [56] -0.372572101 -0.366479596 -0.365070107 -0.370494353 -0.364684859 [61] -0.327018199 > (mypacf <- c(rpacf$acf)) [1] 8.214743e-01 2.354732e-01 3.546729e-01 -3.272188e-02 1.066712e-01 [6] 1.400860e-01 -2.224142e-01 1.299730e-01 -4.782745e-02 -1.125381e-01 [11] 2.587821e-01 2.351606e-01 -3.472812e-01 -1.445554e-01 -6.842077e-02 [16] 1.122263e-01 8.511746e-03 -3.711106e-02 5.512438e-02 -4.781605e-02 [21] 1.027478e-02 -1.698830e-02 4.947613e-02 -8.810737e-02 -3.507661e-02 [26] -9.485191e-02 -3.185931e-02 -2.815063e-02 -7.764801e-02 -5.521055e-02 [31] 6.688965e-02 -5.305438e-02 -6.933343e-02 -1.461659e-02 2.803131e-02 [36] 1.179244e-01 -1.188239e-01 -5.647220e-02 3.310722e-02 -1.035381e-01 [41] -1.474122e-02 -3.206393e-02 2.020008e-02 4.065338e-02 -4.136848e-02 [46] 1.968162e-02 -1.297333e-01 2.196957e-04 3.735505e-02 -5.112942e-02 [51] -8.040675e-03 2.363399e-02 -4.113438e-05 4.645474e-02 -7.592527e-02 [56] 4.647039e-02 2.236043e-02 4.920968e-02 -4.500605e-03 -1.660996e-02 > 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/3gkpy1229865616.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/4cjn81229865616.tab") > > system("convert tmp/11do21229865616.ps tmp/11do21229865616.png") > system("convert tmp/20s331229865616.ps tmp/20s331229865616.png") > > > proc.time() user system elapsed 1.560 0.545 1.643