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 = '0' > 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/1txgh1260971972.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/2opor1260971972.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.310507594 -0.374244009 0.403680839 -0.184470442 [6] -0.179346661 0.428182307 -0.280710945 -0.059787629 0.340640306 [11] -0.467411041 -0.090329144 0.668107969 -0.253251141 -0.262517700 [16] 0.277947308 -0.181833534 -0.076599760 0.282529429 -0.194540227 [21] -0.005870496 0.182016994 -0.352451851 0.020224318 0.408865756 [26] -0.079941246 -0.221628662 0.142841777 -0.068027610 -0.078375898 [31] 0.150274313 -0.008574731 -0.087720136 0.109982612 -0.187609381 [36] -0.066603914 0.339320716 > (mypacf <- c(rpacf$acf)) [1] -0.310507594 -0.520879560 0.099037418 -0.247464763 -0.150981167 [6] 0.196295499 -0.180419625 0.121463916 0.096142963 -0.375245102 [11] -0.300950534 0.299234957 0.294611649 0.020120423 -0.183268318 [16] -0.049249559 -0.069435924 -0.110963255 0.032137114 -0.007718327 [21] -0.139100034 -0.056370574 0.094733506 -0.048748695 0.200086384 [26] 0.025980206 -0.023316971 -0.007586598 -0.078705568 -0.061323389 [31] 0.033109933 -0.061446603 0.066739523 -0.000973970 -0.016049092 [36] 0.051882364 > 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/3gdnj1260971972.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/4vfp01260971972.tab") > > try(system("convert tmp/1txgh1260971972.ps tmp/1txgh1260971972.png",intern=TRUE)) character(0) > try(system("convert tmp/2opor1260971972.ps tmp/2opor1260971972.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.531 0.335 0.952