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.81,0.81,0.81,0.79,0.78,0.78,0.77,0.78,0.77,0.78,0.79,0.79,0.79,0.79,0.79,0.8,0.8,0.8,0.8,0.81,0.8,0.82,0.85,0.85,0.86,0.85,0.83,0.81,0.82,0.82,0.78,0.78,0.73,0.68,0.65,0.62,0.6,0.6,0.59,0.6,0.6,0.6,0.59,0.58,0.56,0.55,0.54,0.55,0.55,0.54,0.54,0.54,0.53,0.53,0.53,0.53) > par7 = '' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '1' > 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/14yqb1291641266.ps",horizontal=F,onefile=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/24yqb1291641266.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.00000000 0.96329138 0.91804072 0.86503653 0.80748910 0.75138724 [7] 0.69331415 0.63316656 0.57112283 0.50858159 0.44052089 0.37187820 [13] 0.30688700 0.24578195 0.18753989 0.13216083 0.07596510 0.01963796 [19] -0.03928933 -0.09561647 -0.15407443 -0.20559550 -0.25121224 -0.29371255 [25] -0.32281783 -0.34171020 -0.35834035 -0.36372505 -0.36721361 -0.37477606 [31] -0.37963509 -0.37602719 -0.37060762 -0.36225936 -0.34719950 -0.33486183 [37] -0.32290901 -0.30567140 -0.29063970 -0.27479134 -0.26041672 -0.24669918 [43] -0.23597604 -0.22404200 -0.21089706 -0.19493606 -0.17763274 -0.16171868 [49] -0.14948426 -0.13504393 -0.12186144 -0.10634162 -0.09082181 -0.07162234 [55] -0.04774823 -0.02387411 > (mypacf <- c(rpacf$acf)) [1] 0.9632913786 -0.1372220845 -0.1197863449 -0.0720607697 0.0087875852 [6] -0.0565871038 -0.0628619892 -0.0580535804 -0.0341252143 -0.1169990872 [11] -0.0427755753 0.0155495713 0.0054812922 -0.0324275366 -0.0242439530 [16] -0.0690644872 -0.0554029474 -0.0974605709 -0.0111706441 -0.0993145033 [21] 0.0275940299 -0.0036299989 -0.0371605197 0.1096627391 0.0777206344 [26] -0.0581724010 0.0952421091 -0.0449415169 -0.1269228111 -0.0306750479 [31] 0.0850986706 -0.0395654779 -0.0340363639 0.0512833779 -0.0475789479 [36] -0.0501337828 0.0816819218 -0.0427976244 -0.0241379675 -0.0840412588 [41] -0.0462413291 -0.0782423604 -0.0059204553 0.0080738699 0.0785870306 [46] -0.0227686911 -0.0033033899 -0.0318345844 0.0403206078 -0.0193393707 [51] 0.0662944571 -0.0614337902 0.0347372435 0.0839621348 -0.0007576514 > 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/30p521291641266.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/438481291641266.tab") > > try(system("convert tmp/14yqb1291641266.ps tmp/14yqb1291641266.png",intern=TRUE)) character(0) > try(system("convert tmp/24yqb1291641266.ps tmp/24yqb1291641266.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.614 0.349 1.452