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(58.972,59.249,63.955,53.785,52.760,44.795,37.348,32.370,32.717,40.974,33.591,21.124,58.608,46.865,51.378,46.235,47.206,45.382,41.227,33.795,31.295,42.625,33.625,21.538,56.421,53.152,53.536,52.408,41.454,38.271,35.306,26.414,31.917,38.030,27.534,18.387,50.556,43.901,48.572,43.899,37.532,40.357,35.489,29.027,34.485,42.598,30.306,26.451,47.460,50.104,61.465,53.726,39.477,43.895,31.481,29.896,33.842,39.120,33.702,25.094) > 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/1b3pk1228414864.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/2sy051228414864.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.4585916649 0.2103955698 0.1033124890 -0.1257759826 [6] -0.2738507666 -0.3624724978 -0.3285287144 -0.1751491013 -0.0410320117 [11] -0.0003882145 0.2064231066 0.6498915017 0.2627499392 0.0996403784 [16] 0.0313557875 -0.1462566089 -0.2079869068 -0.2992451929 -0.2760265872 [21] -0.1043835282 -0.0128127244 0.0276263567 0.2218408991 0.5488414681 [26] 0.2656823944 0.1276646897 0.0072468997 -0.1364434773 -0.1809944815 [31] -0.2792418031 -0.2465846886 -0.1203508342 -0.0748867660 -0.0513097838 [36] 0.0625308696 0.2729053484 0.1159154646 0.0354498751 -0.0326030216 [41] -0.1184204699 -0.1205069954 -0.1979821856 -0.1611782498 -0.0839372332 [46] -0.0437461292 0.0037790317 0.0742414807 0.2115795697 0.1506095831 [51] 0.0797300155 0.0275061045 -0.0375757182 -0.0659074145 -0.1016600416 [56] -0.0937642020 -0.0765173930 -0.0763114771 -0.0605518670 -0.0411274180 > (mypacf <- c(rpacf$acf)) [1] 0.4585916649 0.0001130244 0.0085930884 -0.2232476716 -0.1818237397 [6] -0.1987391997 -0.0721143791 0.0519434377 0.0488338956 -0.0768739682 [11] 0.1494757854 0.6023906548 -0.4797219424 -0.1111962345 -0.0516525547 [16] 0.0600655771 0.0637510040 -0.0305783401 -0.0143232140 0.0074276868 [21] 0.0601947044 0.1243218124 0.0914949419 -0.0614424671 0.0107079172 [26] -0.0034736242 -0.0927546832 0.0797409712 -0.0350726033 0.0331331223 [31] 0.0406532543 -0.1231794212 -0.0259953206 -0.0610931398 -0.1676418930 [36] -0.1333581200 0.0508857723 -0.0075517052 0.1042725394 -0.1171922198 [41] -0.0214219114 -0.0362982619 -0.0699750809 -0.0291019902 0.0008327080 [46] -0.0021988500 0.0208254761 0.0004482919 0.0794210701 0.0215627927 [51] -0.0024376117 0.0388927086 -0.0479961239 0.0712207687 -0.0129939710 [56] 0.0068873581 -0.0975627949 -0.0327374926 0.0042895167 > 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/3obw71228414864.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/48fjg1228414864.tab") > > system("convert tmp/1b3pk1228414864.ps tmp/1b3pk1228414864.png") > system("convert tmp/2sy051228414864.ps tmp/2sy051228414864.png") > > > proc.time() user system elapsed 0.607 0.323 0.847