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(6392.3,8686.4,9244.7,8182.7,7451.4,7988.8,8243.5,8843,9092.7,8246.7,9311.7,8341.2,7116.7,9635.7,9815.4,8611.3,8297.8,8715.1,8919.9,10085.8,9511.7,8991.3,10311.2,8895.4,7449.8,10084,9859.4,9100.1,8920.8,8502.7,8599.6,10394.4,9290.4,8742.2,10217.3,8639,8139.6,10779.1,10427.7,10349.1,10036.4,9492.1,10638.8,12054.5,10324.7,11817.3,11008.9,9996.6,9419.5,11958.8,12594.6,11890.6,10871.7,11835.7,11542.2,13093.7,11180.2,12035.7,12112,10875.2,9897.3,11672.1,12385.7,11405.6,9830.9,11025.1,10853.8,12252.6,11839.4,11669.1,11601.4,11178.4,9516.4,12102.8,12989,11610.2,10205.5,11356.2,11307.1,12648.6,11947.2,11714.1,12192.5,11268.8,9097.4,12639.8,13040.1,11687.3,11191.7,11391.9,11793.1,13933.2,12778.1,11810.3,13698.4,11956.6,10723.8,13938.9,13979.8,13807.4,12973.9,12509.8,12934.1,14908.3,13772.1,13012.6,14049.9,11816.5,11593.2,14466.2,13615.9,14733.9,13880.7,13527.5,13584,16170.2,13260.6,14741.9,15486.5,13154.5,12621.2) > 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/1j4dr1229350062.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/2dvw41229350062.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.7605562912 0.6608231678 0.7106336037 0.6862483974 [6] 0.6732713458 0.7049889671 0.5973246051 0.5985414247 0.5544804095 [11] 0.4360808376 0.5356540573 0.6660986287 0.4724362923 0.4070986192 [16] 0.4229605845 0.4113129022 0.4174705549 0.4248782905 0.3353132794 [21] 0.3665724663 0.3003453315 0.2016653349 0.3054093804 0.3930188322 [26] 0.2390121418 0.1836683962 0.1716074613 0.1888043331 0.1953881466 [31] 0.1847361039 0.1232785305 0.1548815616 0.0840425632 0.0250176017 [36] 0.0988896435 0.1694394949 0.0683289002 0.0002870646 -0.0045587135 [41] 0.0324755451 0.0250948869 0.0217500637 -0.0055569379 0.0085801659 [46] -0.0380827290 -0.0627740580 -0.0225870520 0.0536789899 -0.0286767053 [51] -0.0996413574 -0.0729101700 -0.0459075359 -0.0673495055 -0.0392123625 [56] -0.0696888778 -0.0605628263 -0.0733771852 -0.1101306874 -0.0777321628 [61] 0.0104851132 > (mypacf <- c(rpacf$acf)) [1] 0.760556291 0.195413330 0.388774037 0.109741360 0.176810983 [6] 0.192278291 -0.200954844 0.124702606 -0.249720880 -0.253902503 [11] 0.323635380 0.410291081 -0.342336002 -0.133998716 -0.051219773 [16] 0.104721615 -0.112378416 0.033377986 -0.001768282 0.009975393 [21] -0.034072822 0.017861846 0.033199369 0.041169081 -0.086271266 [26] -0.091527511 -0.081794006 0.122862174 -0.091147380 0.044738838 [31] 0.017573987 -0.033051294 0.026306767 0.063005745 -0.109582077 [36] -0.008587885 0.039994027 -0.077975985 0.003962183 0.040409957 [41] -0.053847731 0.038536586 0.080998031 -0.050586559 0.017146117 [46] 0.085619437 -0.080183122 -0.072463680 -0.050806286 0.017386249 [51] 0.067578958 -0.069996931 0.004919988 0.104649070 -0.006882349 [56] 0.032946210 -0.021552130 -0.069751321 -0.002472679 -0.039951921 > 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/3x6e41229350062.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/41fz71229350062.tab") > > system("convert tmp/1j4dr1229350062.ps tmp/1j4dr1229350062.png") > system("convert tmp/2dvw41229350062.ps tmp/2dvw41229350062.png") > > > proc.time() user system elapsed 0.611 0.326 0.742