R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(7787.0 + ,8474.2 + ,9154.7 + ,8557.2 + ,7951.1 + ,9156.7 + ,7865.7 + ,7337.4 + ,9131.7 + ,8814.6 + ,8598.8 + ,8439.6 + ,7451.8 + ,8016.2 + ,9544.1 + ,8270.7 + ,8102.2 + ,9369.0 + ,7657.7 + ,7816.6 + ,9391.3 + ,9445.4 + ,9533.1 + ,10068.7 + ,8955.5 + ,10423.9 + ,11617.2 + ,9391.1 + ,10872.0 + ,10230.4 + ,9221.0 + ,9428.6 + ,10934.5 + ,10986.0 + ,11724.6 + ,11180.9 + ,11163.2 + ,11240.9 + ,12107.1 + ,10762.3 + ,11340.4 + ,11266.8 + ,9542.7 + ,9227.7 + ,10571.9 + ,10774.4 + ,10392.8 + ,9920.2 + ,9884.9 + ,10174.5 + ,11395.4 + ,10760.2 + ,10570.1 + ,10536.0 + ,9902.6 + ,8889.0 + ,10837.3 + ,11624.1 + ,10509.0 + ,10984.9 + ,10649.1 + ,10855.7 + ,11677.4 + ,10760.2 + ,10046.2 + ,10772.8 + ,9987.7 + ,8638.7 + ,11063.7 + ,11855.7 + ,10684.5 + ,11337.4 + ,10478.0 + ,11123.9 + ,12909.3 + ,11339.9 + ,10462.2 + ,12733.5 + ,10519.2 + ,10414.9 + ,12476.8 + ,12384.6 + ,12266.7 + ,12919.9 + ,11497.3 + ,12142.0 + ,13919.4 + ,12656.8 + ,12034.1 + ,13199.7 + ,10881.3 + ,11301.2 + ,13643.9 + ,12517.0 + ,13981.1 + ,14275.7 + ,13435.0 + ,13565.7 + ,16216.3 + ,12970.0 + ,14079.9 + ,14235.0 + ,12213.4 + ,12581.0 + ,14130.4 + ,14210.8 + ,14378.5 + ,13142.8 + ,13714.7 + ,13621.9 + ,15379.8 + ,13306.3 + ,14391.2 + ,14909.9 + ,14025.4 + ,12951.2 + ,14344.3 + ,16093.4 + ,15413.6 + ,14705.7 + ,15972.8 + ,16241.4 + ,16626.4 + ,17136.2 + ,15622.9 + ,18003.9 + ,16136.1 + ,14423.7 + ,16789.4 + ,16782.2 + ,14133.8 + ,12607.0) > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '1' > par3 = '1' > par2 = '0.0' > par1 = '36' > #'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: > 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 (par6 == 'White Noise') par6 <- 'white' else par6 <- 'ma' > par7 <- as.numeric(par7) > 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/1z75m1260972098.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > racf <- acf(x, par1, main='Autocorrelation', xlab='time lag', ylab='ACF', ci.type=par6, ci=par7, sub=paste('(lambda=',par2,', d=',par3,', D=',par4,', CI=', par7, ', CI type=',par6,')',sep='')) > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2hdne1260972098.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.00000000 -0.52448859 0.10466685 0.22712558 -0.21346347 0.03533401 [7] 0.22107508 -0.32975374 0.10811000 0.23465898 -0.35766765 0.19740874 [13] -0.02071991 -0.22946609 0.16257961 0.01771110 -0.22162624 0.18549497 [19] 0.02617523 -0.21245316 0.20652900 -0.06063189 -0.18991251 0.34074334 [25] -0.26711015 0.03589639 0.18450086 -0.11030766 -0.08508836 0.22596133 [31] -0.24985910 0.08511212 0.08360436 -0.15601247 0.02589251 0.16145119 [37] -0.23831569 > (mypacf <- c(rpacf$acf)) [1] -0.52448859 -0.23509266 0.25060275 0.09245151 -0.10019170 0.17654142 [7] -0.10330313 -0.21878345 0.23002626 0.02669005 -0.11587754 -0.11246491 [13] -0.14958263 -0.15882074 0.05475232 0.07250322 -0.07332208 0.07573116 [19] -0.01766388 -0.13851120 0.04213185 -0.06064448 0.10613691 -0.08858330 [25] -0.04189933 0.02310884 0.11172621 -0.05957396 -0.06038524 -0.03566331 [31] -0.04822914 -0.12271180 0.09781106 -0.07854145 0.02370871 -0.04554126 > 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/30srg1260972098.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/4s02h1260972098.tab") > > try(system("convert tmp/1z75m1260972098.ps tmp/1z75m1260972098.png",intern=TRUE)) character(0) > try(system("convert tmp/2hdne1260972098.ps tmp/2hdne1260972098.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.559 0.306 0.672