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 = '1' > 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/1x4lx1229350348.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/2tguu1229350348.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.531843343 -0.046275073 0.327557322 -0.280207097 [6] 0.060110718 0.257998955 -0.375075326 0.146111599 0.150336468 [11] -0.190515836 0.037673711 -0.009660570 -0.106133454 0.120929320 [16] 0.056334993 -0.256960170 0.164805616 0.080356016 -0.210748046 [21] 0.127251919 0.043017975 -0.286374634 0.396123264 -0.161227135 [26] -0.190878123 0.301489004 -0.171573276 -0.027527997 0.154068328 [31] -0.150431751 0.005092649 0.189694079 -0.171695007 0.021262425 [36] 0.061250428 -0.135509146 0.130815220 0.024117844 -0.182359742 [41] 0.126540945 0.090345548 -0.210859694 0.161422318 -0.020153551 [46] -0.154681205 0.234290138 -0.006674872 -0.280730674 0.311698040 [51] -0.139988131 -0.004178297 0.124667690 -0.157217941 0.037262435 [56] 0.135541527 -0.140703101 0.020592577 0.035036896 -0.051554038 [61] 0.092183134 > (mypacf <- c(rpacf$acf)) [1] -0.531843343 -0.458949709 0.084018175 -0.021725916 -0.040266473 [6] 0.266607205 -0.044275293 -0.131899346 0.018343773 0.123253570 [11] -0.063427803 -0.250125436 -0.212229745 -0.108006903 0.135614230 [16] -0.089732708 -0.085139854 0.128950150 -0.011929980 -0.136023198 [21] 0.065977756 -0.163570225 -0.008588401 -0.028439347 -0.084235791 [26] -0.012121359 -0.065459656 -0.020247394 -0.113146697 0.053243546 [31] -0.012905464 -0.004610992 0.032079256 0.009698614 -0.065003479 [36] -0.253998195 -0.049289789 0.017352889 -0.079879116 -0.130204585 [41] 0.054041437 0.025272803 0.015093509 -0.009552924 -0.007354894 [46] -0.018659173 0.064491534 -0.163883533 -0.084724258 -0.091496752 [51] 0.030694436 0.036557491 -0.006582012 0.089085594 -0.016465578 [56] -0.018194999 0.031630564 -0.038847861 0.005275539 -0.014095773 > 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/34dba1229350348.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/4dthh1229350348.tab") > > system("convert tmp/1x4lx1229350348.ps tmp/1x4lx1229350348.png") > system("convert tmp/2tguu1229350348.ps tmp/2tguu1229350348.png") > > > proc.time() user system elapsed 0.589 0.305 0.743