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(0.7200,0.7400,0.7400,0.7400,0.7400,0.7400,0.7400,0.7400,0.7400,0.7400,0.7400,0.7400,0.7400,0.7500,0.7500,0.7500,0.7500,0.7500,0.7500,0.7500,0.7500,0.7500,0.7500,0.7500,0.7500,0.7600,0.7600,0.7600,0.7600,0.7600,0.7600,0.7600,0.7600,0.7600,0.7600,0.7600,0.7600,0.7800,0.7800,0.7800,0.7800,0.7800,0.7800,0.7800,0.7800,0.7800,0.7800,0.7800,0.7800,0.7800,0.7800,0.7800,0.7800,0.7800,0.7800,0.7800,0.7800,0.7800,0.7800,0.7800,0.7800,0.8000,0.8000,0.8000,0.8000,0.8000,0.8000,0.8000,0.8000,0.8000,0.8000,0.8000,0.8000,0.8100,0.8100,0.8100,0.8100,0.8100,0.8100,0.8100,0.8100,0.8100,0.8100,0.8100) > 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/1pt251228856982.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/2nl2z1228856982.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.942263848 0.906145396 0.870026944 0.833908493 [6] 0.797790041 0.761671589 0.725553137 0.689434686 0.653316234 [11] 0.617197782 0.581079331 0.552432769 0.509567853 0.477511788 [16] 0.445455723 0.413399658 0.381343593 0.349287528 0.317231463 [21] 0.285175398 0.253119333 0.221063268 0.189007202 0.171894917 [26] 0.138533085 0.115980103 0.093427121 0.070874139 0.048321157 [31] 0.025768175 0.003215192 -0.019337790 -0.041890772 -0.064443754 [36] -0.086996736 -0.109549718 -0.148352246 -0.165537074 -0.182721903 [41] -0.199906731 -0.217091559 -0.234276387 -0.251461216 -0.268646044 [46] -0.285830872 -0.303015700 -0.320200529 -0.322441577 > (mypacf <- c(rpacf$acf)) [1] 0.942263848 0.163049992 0.016301570 -0.012503338 -0.018409001 [6] -0.019879084 -0.020501193 -0.020972849 -0.021430404 -0.021901332 [11] -0.022392054 0.045782543 -0.124667585 0.032364969 0.001675963 [16] -0.015232160 -0.020980149 -0.022970934 -0.023914443 -0.024590075 [21] -0.025161327 -0.025430524 -0.024102802 0.101854662 -0.104372464 [26] 0.024648078 0.001372738 -0.014212622 -0.020505636 -0.023016721 [31] -0.024209739 -0.024882861 -0.025014631 -0.023626044 -0.017942501 [36] -0.058406212 -0.143411825 0.100598955 0.027872532 -0.008191162 [41] -0.020925718 -0.025666752 -0.027819254 -0.029066912 -0.029811965 [46] -0.029369323 -0.021871138 0.091295848 > 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/3ivrp1228856983.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/4m0d81228856983.tab") > > system("convert tmp/1pt251228856982.ps tmp/1pt251228856982.png") > system("convert tmp/2nl2z1228856982.ps tmp/2nl2z1228856982.png") > > > proc.time() user system elapsed 0.579 0.330 0.684