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(30.06,30.46,30.46,30.49,30.49,30.5,30.5,30.5,30.51,30.51,30.61,30.88,30.95,31.09,31.28,31.31,31.32,31.34,31.34,31.34,31.34,31.36,31.36,31.36,31.72,32.07,32.13,32.19,32.26,32.27,32.28,32.28,32.28,32.29,32.61,32.68,32.69,32.74,32.86,32.86,32.9,32.95,32.95,32.96,32.99,33,33.06,33.42,33.48,33.5,33.51,33.52,33.55,33.56,33.56,33.56,33.6,33.61,33.62,33.72,33.83,33.96,34.06,34.11,34.11,34.21,34.19,34.17,34.12,34.15,34.15,34.15) > par5 = '12' > par4 = '0' > par3 = '0' > 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: 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/1ovn21242318745.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/24r6j1242318745.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.95867475 0.92243684 0.88451060 0.84584027 0.80506373 [7] 0.76370367 0.72121949 0.67947361 0.63731100 0.59359423 0.54992184 [13] 0.51177252 0.47432406 0.43712334 0.40130984 0.36493617 0.32835755 [19] 0.29144591 0.25374753 0.21549291 0.17657556 0.13703873 0.09546878 [25] 0.05039220 0.01114213 -0.01661958 -0.04332563 -0.07001008 -0.09552342 [31] -0.12111509 -0.14685804 -0.17259562 -0.19830680 -0.22589329 -0.24635540 [37] -0.26607140 -0.28742525 -0.30843216 -0.32290010 -0.33770323 -0.35220642 [43] -0.36603789 -0.37980163 -0.39324076 -0.40521404 -0.41673987 -0.42780531 [49] -0.42688342 > (mypacf <- c(rpacf$acf)) [1] 0.958674748 0.041752611 -0.036025773 -0.031585963 -0.047970573 [6] -0.032670978 -0.037497680 -0.016412630 -0.027724385 -0.045221556 [11] -0.028616769 0.041293426 -0.007401804 -0.022174116 -0.009468671 [16] -0.033988825 -0.033163950 -0.034595714 -0.038946383 -0.038853871 [21] -0.043582040 -0.041726435 -0.056408959 -0.083269051 0.028365233 [26] 0.122451012 0.004353317 -0.030783908 -0.022302008 -0.040458586 [31] -0.043572426 -0.039097609 -0.035196650 -0.069940668 0.034934421 [36] -0.002795190 -0.033727528 -0.027857909 0.054408973 -0.015972774 [41] -0.036163156 -0.029050647 -0.039490004 -0.043827885 -0.029220205 [46] -0.021760819 -0.035629826 0.100950043 > 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/319h91242318745.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/4qtr61242318745.tab") > system("convert tmp/1ovn21242318745.ps tmp/1ovn21242318745.png") > system("convert tmp/24r6j1242318745.ps tmp/24r6j1242318745.png") > > > proc.time() user system elapsed 0.581 0.322 0.682