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(1.27,1.23,1.27,1.22,1.29,1.36,1.44,1.62,1.57,1.22,1.14,1.14,1.17,1.16,1.14,1.15,1.16,1.21,1.22,1.22,1.17,0.95,1,1.01,1.01,1,1,1,1.06,1.22,1.24,1.34,1.3,1.05,1,1,1.01,1.02,1.06,1.09,1.09,1.15,1.25,1.37,1.51,1.35,1.32,1.3,1.39,1.4,1.39,1.42,1.44,1.44,1.45,1.39,1.48,1.32,1.29,1.31,1.27,1.38,1.38,1.45,1.5,1.63,1.73,1.84,1.75,1.34,1.36,1.33,1.37,1.39,1.4,1.4,1.43,1.52,1.54,1.85,1.83,1.29,1.2,1.2,1.21,1.21,1.19,1.18,1.17,1.22,1.25,1.3,1.33,1.18,1.18,1.19) > 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: 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/12ohm1229021337.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/2tyww1229021337.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.175533644 -0.175637963 -0.149156566 -0.190863266 [6] -0.032677193 -0.028586341 -0.028059970 -0.170733179 -0.087899850 [11] -0.141628442 0.032898803 0.573574999 0.154210720 -0.059175733 [16] -0.067653888 -0.118753949 -0.044704652 -0.019173844 -0.034276848 [21] -0.131869792 -0.068434343 -0.042751660 0.088730076 0.368918223 [26] 0.030581861 -0.057566487 -0.068131547 -0.096618741 -0.048317701 [31] -0.042756591 -0.008767458 -0.062228897 -0.098254933 -0.059801964 [36] 0.086831565 0.361073725 0.057365718 -0.066063315 -0.090739917 [41] -0.136437446 -0.012234719 -0.026917780 -0.040217500 -0.031209016 [46] -0.057015529 -0.067156072 0.023591213 0.322798469 > (mypacf <- c(rpacf$acf)) [1] 0.175533644 -0.213013405 -0.080379358 -0.197943091 -0.006691911 [6] -0.121626702 -0.057812244 -0.263221280 -0.082339560 -0.325550793 [11] -0.045554984 0.437826324 -0.114740397 0.066981386 0.027226875 [16] 0.023500640 -0.033764450 0.014417046 -0.052001411 0.001252869 [21] -0.064663631 0.100555661 0.113559501 0.055558533 -0.104507362 [26] 0.056975269 -0.088233341 -0.025419448 -0.076395738 -0.055008775 [31] -0.004807285 0.013673023 -0.135094350 -0.030144896 -0.073349195 [36] 0.127886013 -0.060003781 -0.025913682 -0.055410143 -0.068288246 [41] 0.015437126 -0.022022197 -0.092210172 -0.001107993 -0.020737373 [46] -0.063183201 -0.055960563 0.061326381 > 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/3zx1m1229021337.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/4xfz11229021337.tab") > > system("convert tmp/12ohm1229021337.ps tmp/12ohm1229021337.png") > system("convert tmp/2tyww1229021337.ps tmp/2tyww1229021337.png") > > > proc.time() user system elapsed 0.586 0.333 0.759