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(7.4271,7.7662,7.6289,7.5281,7.3831,7.2355,7.0617,7.1237,7.4533,7.5411,7.4978,7.3525,7.3862,7.311,7.2013,7.249,7.3321,7.59,7.9082,8.2123,8.0929,8.118,8.1206,8.2883,8.4281,8.7917,8.9168,8.9446,8.9786,9.5862,9.6533,9.4125,9.2195,9.2882,9.6774,9.6857,10.1688,10.4399,10.4675,10.149,9.9163,9.9268,10.0529,10.1622,10.083,10.1134,10.3423,10.7536,11.0967,10.8588,10.7719,10.9262,10.708,10.5062,10.0683,9.8954,9.9589,9.9177,9.7189,9.5273,9.5746,9.763,9.6117,9.6581,9.8361,10.2353,10.1285,10.1347,10.2141,10.0971,9.9651,10.1286,10.3356,10.1238,10.1326,10.2467,10.44,10.3689,10.2415,10.3899,10.3162,10.4533,10.6741,10.8957,10.7404,10.6568,10.5682,10.9833,11.0237,10.8462,10.7287,10.7809,10.2609,9.8252,9.1071,8.695,9.2205,9.0496,8.7406,8.921,9.011,9.3157,9.5786,9.6246,9.7485,9.9431,10.1152,10.1827,9.9777,9.7436,9.3462,9.2623,9.1505,8.5794,8.3245,8.6538,8.752,8.8104,9.2665,9.0895) > par8 = '' > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '1' > par1 = 'Default' > #'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: > 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 (par6 == 'White Noise') par6 <- 'white' else par6 <- 'ma' > par7 <- as.numeric(par7) > 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/1wi431293378776.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > racf <- acf(x, par1, main='Autocorrelation', xlab='time lag', ylab='ACF', ci.type=par6, ci=par7, sub=paste('(lambda=',par2,', d=',par3,', D=',par4,', CI=', par7, ', CI type=',par6,')',sep='')) > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/27rlo1293378776.ps",horizontal=F,onefile=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.0000000 0.9639869 0.9190708 0.8723469 0.8227342 0.7675944 0.7091049 [8] 0.6532479 0.6067738 0.5688314 0.5329530 0.4992278 0.4650384 0.4362538 [15] 0.4093390 0.3794727 0.3464813 0.3110463 0.2746688 0.2360540 0.1923458 > (mypacf <- c(rpacf$acf)) [1] 0.96398693 -0.14421191 -0.03428737 -0.06245749 -0.09808442 -0.06249605 [7] 0.01535848 0.09952053 0.07487411 -0.01795412 -0.01253067 -0.06746226 [13] 0.03077786 -0.01359945 -0.05100371 -0.03882498 -0.04850078 -0.03509492 [19] -0.05198237 -0.08131313 > 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/3tsku1293378776.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/4esi01293378776.tab") > > try(system("convert tmp/1wi431293378776.ps tmp/1wi431293378776.png",intern=TRUE)) character(0) > try(system("convert tmp/27rlo1293378776.ps tmp/27rlo1293378776.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.534 0.308 1.136