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(92.66,94.2,94.37,94.45,94.62,94.37,93.43,94.79,94.88,94.79,94.62,94.71,93.77,95.73,95.99,95.82,95.47,95.82,94.71,96.33,96.5,96.16,96.33,96.33,95.05,96.84,96.92,97.44,97.78,97.69,96.67,98.29,98.2,98.71,98.54,98.2,96.92,99.06,99.65,99.82,99.99,100.33,99.31,101.1,101.1,100.93,100.85,100.93,99.6,101.88,101.81,102.38,102.74,102.82,101.72,103.47,102.98,102.68,102.9,103.03,101.29) > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '-2.0' > par1 = '60' > #'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/108av1228664348.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/2aqli1228664348.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.91515230 0.87070830 0.82858710 0.78845805 0.74780218 [7] 0.73713586 0.64799235 0.59987075 0.55283657 0.50882974 0.46467317 [13] 0.45211920 0.37151019 0.32995286 0.28816234 0.24465233 0.19679451 [19] 0.18226557 0.10631041 0.06556396 0.02651230 -0.01494401 -0.05055238 [25] -0.05581306 -0.11508296 -0.14554872 -0.18225509 -0.21489168 -0.23816715 [31] -0.24226474 -0.28960810 -0.30986167 -0.33391460 -0.34999261 -0.36095708 [37] -0.35639687 -0.38880509 -0.39646443 -0.40158332 -0.40613475 -0.41025286 [43] -0.39634136 -0.40653941 -0.39680023 -0.38592186 -0.38048316 -0.37526984 [49] -0.35581164 -0.35237323 -0.32943825 -0.30783087 -0.28505435 -0.25940173 [55] -0.22512511 -0.19957394 -0.16390900 -0.13293062 -0.10393239 -0.07227019 [61] -0.03339172 > (mypacf <- c(rpacf$acf)) [1] 0.9151523031 0.2043404634 0.0486702712 0.0113219861 -0.0132691924 [6] 0.1728369611 -0.4325048243 0.0609161986 0.0082730681 0.0043452945 [11] -0.0002335385 0.0900311091 -0.2181488588 0.0141871695 -0.0056830411 [16] -0.0454454473 -0.0524676540 0.0534222735 -0.1426713254 -0.0278467850 [21] 0.0013598720 -0.0373375837 0.0484714060 0.0228788019 -0.0725017007 [26] -0.0580613158 -0.0860631516 0.0069279386 0.0417436299 -0.0600182073 [31] -0.0180823056 -0.0231877141 -0.0281762940 0.0280904845 -0.0089786161 [36] -0.0391969439 -0.0258582724 -0.0191941600 0.0301818865 -0.0390204451 [41] -0.0485926996 0.0222068033 0.0586172781 -0.0187394649 0.0190701055 [46] -0.0510185041 -0.0495673665 -0.0084370097 0.0418602705 0.0247219243 [51] 0.0197342994 0.0553393550 0.0324627271 -0.0132595383 0.0568539031 [56] 0.0132062494 -0.0120304570 -0.0047653270 0.0301173055 0.0158857682 > 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/3qb4t1228664348.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/4wj671228664348.tab") > > system("convert tmp/108av1228664348.ps tmp/108av1228664348.png") > system("convert tmp/2aqli1228664348.ps tmp/2aqli1228664348.png") > > > proc.time() user system elapsed 0.608 0.320 0.713