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(0.63709,0.64218,0.65711,0.66977,0.68255,0.68902,0.71322,0.70224,0.70045,0.69919,0.69693,0.69763,0.69278,0.70196,0.69215,0.6769,0.67124,0.66533,0.67157,0.66428,0.66576,0.66942,0.68130,0.69144,0.69862,0.695,0.69867,0.68968,0.69233,0.68293,0.68399,0.66895,0.68756,0.68527,0.6776,0.68137,0.67933,0.67922,0.68598,0.68297,0.68935,0.69463,0.6833,0.68666,0.68782,0.67669,0.67511,0.67254,0.67397,0.67286,0.66341,0.668,0.68021,0.67934,0.68136,0.67562,0.6744,0.67766,0.68887,0.69614,0.70896,0.72064,0.74725,0.75094,0.77494,0.79487,0.79209,0.79152,0.79308,0.79279,0.79924,0.78668) > 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/1vmdx1244205207.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/2sh211244205207.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.167516380 0.290528170 0.204100165 0.103359094 [6] 0.048841888 -0.042227963 -0.156483347 0.024032082 -0.177859467 [11] -0.065833077 -0.051679505 -0.036221689 -0.140603144 -0.028135999 [16] -0.092940180 0.032433789 -0.010848779 -0.012968330 0.053533685 [21] 0.032567318 0.018994405 0.036335284 -0.148226395 0.034289498 [26] -0.148585904 0.068816777 -0.035010603 -0.069688323 -0.004925858 [31] 0.080135096 -0.151324363 0.026054141 -0.113758864 -0.037298811 [36] 0.015371921 -0.024068659 -0.028436437 0.091021262 -0.036614818 [41] 0.074879101 0.009939132 0.026320904 -0.097782639 -0.098426261 [46] -0.163350792 -0.065963697 -0.130238598 -0.116916121 > (mypacf <- c(rpacf$acf)) [1] 0.167516380 0.270044346 0.136880532 -0.011961739 -0.057150741 [6] -0.105861490 -0.179043619 0.103653266 -0.084937652 -0.002346917 [11] 0.030142900 0.021827497 -0.160708552 -0.012036340 -0.024515704 [16] 0.057301169 0.055564684 -0.020959096 0.017796687 -0.026227611 [21] 0.003402129 -0.033683879 -0.178696513 0.052239226 -0.083215672 [26] 0.178829971 0.005210704 -0.100411125 -0.035897863 0.091479107 [31] -0.182925621 -0.026118145 -0.014756074 -0.018693776 0.125912539 [36] 0.005054521 -0.082923855 -0.029323506 0.047216351 -0.007715731 [41] -0.026643190 0.043655474 -0.181582525 -0.090878555 -0.100490192 [46] -0.065992939 -0.004303003 -0.010396866 > 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/361rw1244205207.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/49rk01244205207.tab") > > system("convert tmp/1vmdx1244205207.ps tmp/1vmdx1244205207.png") > system("convert tmp/2sh211244205207.ps tmp/2sh211244205207.png") > > > proc.time() user system elapsed 0.563 0.301 0.689