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 = '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/13hwe1229020004.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/2gvb61229020004.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.840163192 0.624212804 0.464102338 0.355112492 [6] 0.306148325 0.266516055 0.235494533 0.212849688 0.244213497 [11] 0.301824341 0.404442397 0.496651136 0.407023857 0.268491036 [16] 0.151095254 0.070120031 0.027527439 -0.009044685 -0.039969825 [21] -0.062452884 -0.044193661 -0.005325782 0.047166460 0.071131187 [26] -0.022814375 -0.125603036 -0.210626327 -0.262674736 -0.281152757 [31] -0.286366128 -0.280578119 -0.275005249 -0.251269431 -0.199582672 [36] -0.129134016 -0.089150852 -0.162356954 -0.254176936 -0.323978668 [41] -0.360409660 -0.356014035 -0.345718420 -0.326598638 -0.294088565 [46] -0.251520284 -0.192561805 -0.112202957 -0.039687239 > (mypacf <- c(rpacf$acf)) [1] 0.8401631920 -0.2776410031 0.1006407047 0.0005620918 0.1155247208 [6] -0.0555417331 0.0574767067 0.0059874010 0.2174670332 0.0492854633 [11] 0.3004594450 0.0353491047 -0.4588519945 0.0815167802 -0.0820663005 [16] -0.0101990980 -0.0625921165 -0.0148113892 -0.0187146560 0.0052816364 [21] -0.0306080440 0.0424854568 -0.1253538888 -0.1455964476 -0.1103545951 [26] 0.0685894668 -0.1093204137 0.0069952700 -0.0218686421 0.0512228903 [31] -0.0156662720 -0.0261003587 -0.0557625491 0.0912762510 -0.0131153528 [36] 0.0260805766 -0.1541707741 -0.0087423172 -0.0125022761 -0.0135537592 [41] 0.0317543456 -0.0633764514 -0.0137990520 0.0634363063 -0.0212200301 [46] 0.0040513970 0.0350614796 0.0495367561 > 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/386ej1229020004.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/4jmr71229020004.tab") > > system("convert tmp/13hwe1229020004.ps tmp/13hwe1229020004.png") > system("convert tmp/2gvb61229020004.ps tmp/2gvb61229020004.png") > > > proc.time() user system elapsed 0.560 0.304 0.963