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(6340.5,7901.5,8191.1,7181.7,7594.4,7384.7,7876.7,8463.4,8317.2,7778.7,8532.8,7272.2,6680.1,8427.6,8752.8,7952.7,8694.3,7787,8474.2,9154.7,8557.2,7951.1,9156.7,7865.7,7337.4,9131.7,8814.6,8598.8,8439.6,7451.8,8016.2,9544.1,8270.7,8102.2,9369,7657.7,7816.6,9391.3,9445.4,9533.1,10068.7,8955.5,10423.9,11617.2,9391.1,10872,10230.4,9221,9428.6,10934.5,10986,11724.6,11180.9,11163.2,11240.9,12107.1,10762.3,11340.4,11266.8,9542.7,9227.7,10571.9,10774.4,10392.8,9920.2,9884.9,10174.5,11395.4,10760.2,10570.1,10536,9902.6,8889,10837.3,11624.1,10509,10984.9,10649.1,10855.7,11677.4,10760.2,10046.2,10772.8,9987.7,8638.7,11063.7,11855.7,10684.5,11337.4,10478,11123.9,12909.3,11339.9,10462.2,12733.5,10519.2,10414.9,12476.8,12384.6,12266.7,12919.9,11497.3,12142,13919.4,12656.8,12034.1,13199.7,10881.3,11301.2,13643.9,12517,13981.1,14275.7,13435,13565.7,16216.3,12970,14079.9,14235,12213.4,12581) > par5 = '12' > par4 = '0' > par3 = '1' > 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/1bqrj1229253151.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/22mz81229253151.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.35852430 -0.34139884 0.46703866 -0.28264235 -0.19269487 [7] 0.53419961 -0.34707770 -0.12456913 0.44784537 -0.51990711 -0.08319193 [13] 0.68516854 -0.29997327 -0.20382843 0.33101984 -0.30921711 -0.01719562 [19] 0.37174380 -0.32558462 0.00292850 0.29256025 -0.46264942 0.03989777 [25] 0.46245046 -0.20650127 -0.10456087 0.16113319 -0.21690247 0.04265618 [31] 0.18628602 -0.18599153 0.01826054 0.13625516 -0.27609960 0.02168694 [37] 0.30548857 -0.03749413 -0.16557635 0.10696043 -0.08763844 -0.03030791 [43] 0.13951874 -0.04617718 -0.07652962 0.10912309 -0.12804717 -0.11300365 [49] 0.30952416 0.03651221 -0.27259891 0.16728922 -0.01834951 -0.16263819 [55] 0.21435391 -0.03631610 -0.15984282 0.18616907 -0.10915805 -0.19872006 [61] 0.38601741 > (mypacf <- c(rpacf$acf)) [1] -0.358524304 -0.539254054 0.138013818 -0.277562873 -0.246862949 [6] 0.218688539 -0.162385100 -0.002931577 0.113230999 -0.430087287 [11] -0.351263860 0.234977701 0.384751864 0.105920317 -0.215402802 [16] -0.070730595 0.011072375 -0.081383450 -0.031597837 -0.035883059 [21] -0.065910792 -0.095452491 0.059427720 0.013223386 0.075662573 [26] 0.004726657 -0.107924639 0.028093329 -0.046745991 -0.219133480 [31] -0.050564704 -0.082562900 -0.081204231 0.004805610 0.073418217 [36] 0.017978206 0.066030930 -0.124455551 -0.002370080 -0.021994675 [41] -0.069524947 -0.063467660 0.055252759 0.031930830 0.007789134 [46] 0.075162790 -0.001427663 -0.037699973 0.010614538 -0.141011803 [51] 0.049788189 0.014555158 -0.000701267 0.017835724 -0.092140605 [56] 0.034662948 -0.024632847 0.021434094 0.004722543 -0.098124660 > 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/3ocel1229253151.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/40vp81229253151.tab") > > system("convert tmp/1bqrj1229253151.ps tmp/1bqrj1229253151.png") > system("convert tmp/22mz81229253151.ps tmp/22mz81229253151.png") > > > proc.time() user system elapsed 0.595 0.318 0.906