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(35810356.5,35492936.3,38937434.1,40059102.8,37708710.2,41570965.7,36333563,34181220.1,42593543.9,43119727.6,38497690.9,45473273.4,38399780.4,38882302.6,44051120.6,41677559.9,40699203.5,44150027.6,38225518.7,35447405.7,43075518.3,42302792,39743541.7,44670641.2,37123384,37668266.4,46117528.8,42273156.4,39404153.2,45799994.5,38602505.2,39454830.1,47427901.4,46497980.9,45057149.4,50615569.2,43033396.2,46013056.5,54222266.3,46417306.4,51046271.8,51201279.6,43475288.7,44968981.1,53939345.4,54549319.7,54072107.3,58434230.1,51158751,50039368,57872617.4,51642978.8,54534465.9,56094697.8,48189983.1,47492381,52987449.1,55719803.5,53922860.5,54931231.9) > par5 = '12' > par4 = '0' > 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/1doex1228827363.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/2ielz1228827363.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.3851448957 -0.3906018717 0.6114777174 -0.4430256845 [6] -0.2432661241 0.7367577177 -0.3128206879 -0.3058537070 0.5190939307 [11] -0.4080144778 -0.2250906821 0.7239129612 -0.3223813334 -0.2445473351 [16] 0.4744469289 -0.4137190954 -0.1210290678 0.5492972618 -0.3150189143 [21] -0.1349444363 0.3633498824 -0.3635141335 -0.0671019125 0.4884900944 [26] -0.2967610817 -0.0915422272 0.3055854777 -0.3362754372 0.0103332957 [31] 0.3221154394 -0.2169099335 -0.0247061295 0.1707618547 -0.2307588391 [36] 0.0160461693 0.2512322652 -0.1389325786 -0.0551565256 0.1391393407 [41] -0.1678484528 0.0031114127 0.1605368734 -0.1000658740 -0.0034176500 [46] 0.0708294235 -0.1046999112 0.0057601774 0.0861661243 -0.0331872109 [51] -0.0141947711 0.0099135346 -0.0158488780 -0.0081286585 0.0188880444 [56] 0.0004761837 -0.0053676035 0.0024633241 -0.0003093139 > (mypacf <- c(rpacf$acf)) [1] -0.385144896 -0.632806877 0.239157873 -0.513795069 -0.435040176 [6] 0.142484201 0.181469907 -0.057821012 -0.031765199 -0.190916811 [11] -0.290946722 0.143474532 0.076216334 0.121543984 -0.052509956 [16] -0.021206171 0.101824507 -0.088256330 -0.179513084 -0.120782802 [21] -0.152956672 -0.084139595 -0.062913791 0.011011663 -0.045426915 [26] -0.043185581 -0.140748848 -0.065277220 -0.017204232 -0.219711910 [31] 0.026744315 0.005539799 -0.020578045 0.016415020 -0.035443256 [36] -0.051370489 0.068432943 -0.094320182 0.001748940 0.030200452 [41] -0.007162868 -0.031580426 -0.136608726 -0.107293786 0.022700527 [46] 0.015159799 -0.003044775 -0.089208897 -0.117755119 0.010188930 [51] -0.130093733 -0.059062719 -0.026218944 0.055159305 -0.055686518 [56] 0.001817314 0.023315883 -0.058365573 > 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/3t2lh1228827363.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/4lut71228827363.tab") > > system("convert tmp/1doex1228827363.ps tmp/1doex1228827363.png") > system("convert tmp/2ielz1228827363.ps tmp/2ielz1228827363.png") > > > proc.time() user system elapsed 0.597 0.317 0.708