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(528,478,469,490,493,508,517,514,510,527,542,565,555,499,511,526,532,549,561,557,566,588,620,626,620,573,573,574,580,590,593,597,595,612,628,629,621,569,567,573,584,589,591,595,594,611,613,611,594,543,537,544,555,561,562,555,547,565,578,580) > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '' > par6 = '' > par5 = '12' > par4 = '1' > par3 = '1' > par2 = '1' > par1 = '60' > ylab = '' > xlab = '' > main = '' > #'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/1j93w1230119938.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/2f24d1230119938.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.0416207863 0.0826121203 0.0556601060 0.1150994751 [6] -0.0775229607 0.0778590585 -0.0061326976 0.0940634419 -0.0848136284 [11] -0.1151491173 0.1158394601 -0.2400920137 -0.1854036068 0.0755146226 [16] -0.0739826105 -0.1338671104 0.0043226287 0.0105568605 0.1022520203 [21] -0.0077783920 0.0109324022 0.0466099115 0.0485372622 -0.1494423416 [26] -0.0153268697 -0.0922908672 -0.0086455573 -0.0401582134 0.0300025406 [31] -0.0571894185 -0.0508565020 -0.1107410019 0.0316357870 -0.0841324342 [36] -0.0585982997 0.0002560102 0.0755342695 0.0524873487 0.0230259241 [41] 0.0254889916 -0.0396187472 -0.0078110869 0.0135853402 0.0783254861 [46] 0.0192375124 -0.0082643166 > (mypacf <- c(rpacf$acf)) [1] -4.162079e-02 8.102018e-02 6.271161e-02 1.146267e-01 -7.861782e-02 [6] 5.060260e-02 -3.151662e-03 8.403289e-02 -7.168185e-02 -1.597570e-01 [11] 1.238866e-01 -2.434988e-01 -1.854962e-01 1.081808e-01 -6.575923e-02 [16] -6.541023e-02 5.555264e-03 4.781986e-02 1.492682e-01 3.945516e-02 [21] 2.446645e-02 -7.081794e-02 7.431239e-02 -1.521216e-01 -2.505998e-01 [26] -1.088715e-01 -1.949882e-02 -7.646543e-02 2.288332e-02 2.029173e-03 [31] 2.842316e-02 1.302153e-02 8.202855e-02 -7.755462e-02 -1.731254e-02 [36] -7.879932e-03 -9.007422e-02 5.872003e-05 -1.326534e-02 -7.774355e-02 [41] -1.528702e-01 -5.383788e-02 5.119084e-02 6.362590e-02 1.253764e-01 [46] -1.515623e-02 > 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/3cpqv1230119938.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/4zwvh1230119938.tab") > > system("convert tmp/1j93w1230119938.ps tmp/1j93w1230119938.png") > system("convert tmp/2f24d1230119938.ps tmp/2f24d1230119938.png") > > > proc.time() user system elapsed 0.572 0.308 0.718