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(1.64,1.65,1.65,1.65,1.66,1.66,1.67,1.67,1.68,1.68,1.68,1.68,1.69,1.69,1.7,1.7,1.71,1.71,1.71,1.71,1.72,1.72,1.72,1.73,1.73,1.73,1.74,1.75,1.75,1.76,1.76,1.77,1.77,1.78,1.79,1.8,1.8,1.81,1.81,1.81,1.81,1.82,1.82,1.82,1.83,1.83,1.83,1.84,1.84,1.85,1.85,1.86,1.86,1.86,1.86,1.86) > par8 = '' > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '1' > 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: > 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/1rqac1293185391.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/22zax1293185391.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.0000000000 -0.2860568246 -0.0011602124 -0.0000773475 0.2382560718 [6] -0.3349404424 0.0475171454 0.2381787243 0.0951374207 -0.3339349250 [11] 0.0485226628 0.0961687207 -0.2852317847 -0.0457897179 0.0972000206 [16] 0.1437374310 -0.3318981076 0.1447945135 -0.0448099830 -0.0470530604 [21] -0.0459701954 0.1435827360 -0.0016758624 -0.0504821327 -0.0970711081 [26] 0.0913731759 -0.0505594802 -0.0029134224 0.0935131233 -0.0029649874 [31] 0.0446810705 -0.0972515856 -0.0019336874 -0.0019594699 -0.0008766050 [36] 0.0467694529 -0.0009281700 0.0467178879 -0.0475429279 -0.0486773578 [41] 0.0466405404 0.0000515650 -0.0010828650 > (mypacf <- c(rpacf$acf)) [1] -0.286056825 -0.090384770 -0.028873681 0.252614624 -0.222371697 [6] -0.104908245 0.246410157 0.241613041 -0.204464001 -0.267633541 [11] -0.025898329 -0.171290517 -0.028438425 -0.134219928 0.064881899 [16] -0.086351814 0.054372631 -0.102489435 -0.082658114 0.210276648 [21] -0.047546986 -0.105026775 -0.081556788 -0.149939688 -0.049541554 [26] 0.010924423 -0.009249416 -0.045191027 0.007857568 0.091194897 [31] -0.008438878 -0.118079056 -0.045444172 -0.094964122 0.040419431 [36] -0.068995669 -0.074709851 0.001706049 0.047465062 0.050485805 [41] -0.068075768 -0.010830335 > 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/36z8l1293185391.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/4r0781293185391.tab") > > try(system("convert tmp/1rqac1293185391.ps tmp/1rqac1293185391.png",intern=TRUE)) character(0) > try(system("convert tmp/22zax1293185391.ps tmp/22zax1293185391.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.552 0.368 1.308