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 = '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/159b31228830873.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/2qura1228830873.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.0603708628 -0.0240171636 0.1374301504 -0.0944071695 [6] 0.0107450228 0.3448738041 0.0532465712 -0.0737853246 0.1069198360 [11] -0.1009120456 -0.0399297471 0.7345739485 -0.0137264707 -0.0541326394 [16] 0.1067093950 -0.1070202052 -0.0412381566 0.2286321901 -0.0124946047 [21] -0.1006974837 -0.0019026569 -0.1396385656 -0.1031884789 0.4800460122 [26] -0.0513807126 -0.0931078610 0.0352733971 -0.1393406145 -0.0705039079 [31] 0.0995969850 -0.0579946665 -0.1176134296 -0.0786145132 -0.1471977218 [36] -0.0918159368 0.2976449704 -0.0550764247 -0.0992627648 -0.0415227631 [41] -0.1527960557 -0.0922760126 0.0186816589 -0.0440758755 -0.1164164887 [46] -0.1200141826 -0.1449403766 -0.0892950102 0.1170768158 -0.0349271361 [51] -0.0597344210 -0.0701974606 -0.0907827056 -0.0576530411 -0.0003388381 [56] -0.0099902971 -0.0623280525 -0.0729337163 -0.0947354535 -0.0678644682 > (mypacf <- c(rpacf$acf)) [1] 0.060370863 -0.027762991 0.141219565 -0.115683241 0.036018794 [6] 0.326503644 0.037057621 -0.094793522 0.046348987 -0.061366433 [11] -0.013287282 0.705379724 -0.263743114 -0.082907851 -0.020587648 [16] 0.071513371 -0.029947355 -0.215122850 -0.086685046 0.040989596 [21] -0.160917046 0.064804033 -0.033239812 -0.111279799 0.113941554 [26] -0.049601573 -0.042407203 -0.046135868 0.013548585 -0.058866150 [31] -0.042594322 -0.049702015 0.039113213 -0.033071858 0.099928063 [36] -0.048939331 0.002314764 -0.001411853 -0.078629583 -0.021460658 [41] -0.099164440 -0.002457223 0.065558150 -0.122800350 0.012317968 [46] -0.001100106 -0.059119746 -0.099860306 0.012409116 0.075250801 [51] -0.048836257 0.038543960 0.052408548 0.032941955 -0.024608681 [56] 0.077554672 0.094467276 -0.092881112 -0.114868684 > 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/3cpqj1228830873.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/4hr6f1228830873.tab") > > system("convert tmp/159b31228830873.ps tmp/159b31228830873.png") > system("convert tmp/2qura1228830873.ps tmp/2qura1228830873.png") > > > proc.time() user system elapsed 0.593 0.307 0.687