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(1202454.6,1201423.4,1505916,1513377.6,1977605.3,1873829.6,1424049.1,1322740,1584825.5,1680460.3,1648573.7,3095468.7,1307982.9,1367588.9,1572718.3,1611602.9,1641196.4,1845262.4,1464237.6,1402385.7,2077099.8,1691129.6,1729012.7,3347792.1,1365087.7,1545460,1844355.1,1775549.8,1721779.2,2128726.1,1664319.9,1769471.4,1904578.4,1872042.3,1802181,3222199.4,1491414.2,1658519.2,2079206.9,1748767.4,2084447.4,2067181.6,1718122.8,1782337.1,1958118.4,2028681.3,2076128.1,3383873,1870369,1654852.9,2074338.3,1888653.7,1991137.8,2168237.9,1867424.1,1842359.6,1927476.3,2065555.4,2455608.5,3336170.9) > par5 = '12' > par4 = '1' > 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/1zhhm1229350620.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/2bz4l1229350620.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.0000000000 -0.1262451497 0.0756843677 0.0209514016 -0.2124686324 [6] -0.0582395995 -0.0473649572 0.0841009400 -0.0230383389 -0.0216975922 [11] -0.0128213085 0.0868139236 -0.2207597226 -0.1047440365 -0.0710973954 [16] -0.0917141296 0.0075506356 0.1148185549 0.1973880325 -0.0856781503 [21] 0.1959718036 -0.0788045988 -0.0317171022 -0.0579840666 -0.0811226738 [26] 0.1286382615 -0.0847429056 0.1019022259 0.0977015908 -0.0821567572 [31] -0.1844078359 -0.0161541487 -0.1323169091 0.0397092327 0.0365102851 [36] 0.0683308232 0.0080474940 -0.0457797649 0.1134551357 -0.0310850448 [41] 0.0483440653 0.0085889475 -0.0855772056 0.0535820989 -0.0119979925 [46] 0.0198551033 -0.0083597223 0.0001308173 > (mypacf <- c(rpacf$acf)) [1] -0.12624515 0.06071418 0.03834110 -0.21454105 -0.11977855 -0.03974780 [7] 0.10391597 -0.03864957 -0.09182471 -0.05704617 0.13792347 -0.20452349 [13] -0.23803603 -0.14089295 -0.03203998 -0.08083891 -0.01515790 0.13090672 [19] -0.06651333 0.15072271 -0.03251282 -0.02601612 -0.07052052 -0.09276069 [25] 0.04676719 -0.08627887 -0.03539861 0.05275728 -0.02583891 -0.18382175 [31] -0.08696329 -0.02632236 0.09304970 -0.04849134 -0.05496843 -0.11669732 [37] -0.01095289 0.01421832 -0.02715835 0.01042342 0.07138007 -0.15175114 [43] -0.04708817 -0.01888585 -0.12782208 -0.10907195 0.02452702 > 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/31vaj1229350620.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/48cdj1229350620.tab") > > system("convert tmp/1zhhm1229350620.ps tmp/1zhhm1229350620.png") > system("convert tmp/2bz4l1229350620.ps tmp/2bz4l1229350620.png") > > > proc.time() user system elapsed 0.616 0.324 0.794