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(8.82000 + ,8.80000 + ,8.82000 + ,8.58000 + ,8.54000 + ,8.42000 + ,8.43000 + ,8.44000 + ,8.09000 + ,7.69000 + ,7.56000 + ,7.54000 + ,7.40000 + ,7.39000 + ,7.37000 + ,7.31000 + ,7.35000 + ,7.26000 + ,7.37000 + ,7.35000 + ,7.33000 + ,7.32000 + ,7.31000 + ,7.33000 + ,7.32000 + ,7.27000 + ,7.48000 + ,7.70000 + ,7.77000 + ,7.80000 + ,7.84000 + ,7.81000 + ,7.78000 + ,7.82000 + ,7.80000 + ,7.81000 + ,7.80000 + ,7.66000 + ,7.41000 + ,7.35000 + ,7.39000 + ,7.32000 + ,7.32000 + ,7.30000 + ,7.29000 + ,7.26000 + ,7.22000 + ,7.21000 + ,7.21000 + ,7.21000 + ,7.20000 + ,7.19000 + ,7.18000 + ,7.12000 + ,7.12000 + ,7.07000 + ,7.08000 + ,7.05000 + ,7.06000 + ,7.07000 + ,7.08000 + ,7.08000 + ,7.09000 + ,7.07000 + ,7.06000 + ,6.99000 + ,6.99000 + ,6.99000 + ,6.98000 + ,6.96000 + ,6.95000 + ,6.91000 + ,6.91000 + ,6.87000 + ,6.91000 + ,6.89000 + ,6.88000 + ,6.90000 + ,6.91000 + ,6.85000 + ,6.86000 + ,6.82000 + ,6.80000 + ,6.83000 + ,6.84000 + ,6.89000 + ,7.14000 + ,7.21000 + ,7.25000 + ,7.31000 + ,7.30000 + ,7.48000 + ,7.49000 + ,7.40000 + ,7.44000 + ,7.42000 + ,7.14000 + ,7.24000 + ,7.33000 + ,7.61000 + ,7.66000 + ,7.69000 + ,7.70000 + ,7.68000 + ,7.71000 + ,7.71000 + ,7.72000 + ,7.68000 + ,7.72000 + ,7.74000 + ,7.76000 + ,7.90000 + ,7.97000 + ,7.96000 + ,7.95000 + ,7.97000 + ,7.93000 + ,7.99000 + ,7.96000 + ,7.92000 + ,7.97000 + ,7.98000 + ,8.00000 + ,8.04000 + ,8.17000 + ,8.29000 + ,8.26000 + ,8.30000 + ,8.32000 + ,8.28000 + ,8.27000 + ,8.32000) > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1' > par1 = '48' > #'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/1f6gs1260352634.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/27ply1260352634.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.3540496675 0.1520256337 0.1431018943 0.0968157974 [6] 0.1108570634 0.1206744606 0.0573402007 0.0822453972 0.0261999364 [11] -0.0912707504 0.0004692929 0.0723100059 0.1012655283 0.0768495528 [16] -0.0819131567 -0.0100173271 -0.0648010644 -0.1939817962 -0.1310483741 [21] -0.0257742240 -0.0488115395 0.0011910794 0.0050283245 -0.0179292953 [26] 0.0756698163 0.1042052608 0.0279491354 0.0680545989 0.1257653499 [31] 0.0805845645 0.0215397174 0.0195971668 0.0937162813 0.0838793937 [36] 0.0481347207 0.0363210834 0.0376832948 0.0576726857 0.0123585776 [41] 0.0188905781 0.0332975502 0.0012196213 0.0200828457 -0.0048261999 [46] -0.0094776574 -0.0310566171 -0.0270242294 -0.0557616449 > (mypacf <- c(rpacf$acf)) [1] 0.354049668 0.030497344 0.091689131 0.018213345 0.067824165 [6] 0.056107707 -0.019432545 0.052877367 -0.042514881 -0.122689601 [11] 0.056655719 0.068817570 0.077214887 0.010577553 -0.142969179 [16] 0.058005065 -0.105532263 -0.166875843 -0.030430951 0.048593587 [21] -0.001027575 0.069504808 0.066830924 0.009908577 0.058982342 [26] 0.079634210 -0.050980151 0.010218686 0.099656218 0.019058025 [31] -0.003588484 0.012150998 0.061424450 -0.008140499 -0.013817370 [36] -0.049586479 -0.029365834 0.024845919 -0.050158818 0.041406811 [41] 0.034195229 -0.064324848 0.076102276 0.037053739 -0.028223141 [46] -0.060199350 0.030912742 -0.019052640 > 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/3h8hh1260352634.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/4i07c1260352634.tab") > > system("convert tmp/1f6gs1260352634.ps tmp/1f6gs1260352634.png") > system("convert tmp/27ply1260352634.ps tmp/27ply1260352634.png") > > > proc.time() user system elapsed 0.575 0.320 1.082