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.6923,0.6886,0.6855,0.6745,0.6769,0.6758,0.6896,0.6843,0.6818,0.6774,0.6821,0.6885,0.6829,0.6796,0.6976,0.6924,0.6849,0.6921,0.6839,0.6727,0.6776,0.6692,0.6738,0.6740,0.6635,0.6737,0.6788,0.6828,0.6795,0.6740,0.6744,0.6764,0.6987,0.6967,0.7116,0.7357,0.7455,0.7639,0.7958,0.7864,0.7853,0.7903,0.7866,0.8039,0.7916,0.7903,0.8242,0.9567,0.8850,0.8865,0.9258,0.8948,0.8762,0.8527,0.8536,0.8805,0.9155,0.8961,0.9127,0.8857) > par8 = '' > par7 = '0.95' > par6 = 'MA' > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '0.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: > 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/106261292666989.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/206261292666989.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.1435085516 -0.1563213191 0.1337989880 -0.0146958849 [6] -0.0901386716 -0.0164127516 -0.1329681043 0.0432589771 0.3177654947 [11] -0.1001779926 0.0915017374 0.0452179897 -0.0365925886 -0.0928982751 [16] 0.1119359530 -0.1209197951 -0.0647720364 0.0209473554 -0.0864370933 [21] 0.0469825464 0.0392769109 -0.0339498339 -0.0626577964 0.0585144487 [26] -0.0400655242 -0.0605393673 -0.0108419741 -0.0774240154 -0.0059000608 [31] 0.0502777531 -0.0928063015 0.0050072444 0.1013193491 -0.1124868539 [36] -0.0232803365 0.0693511652 -0.0404189380 -0.0382451911 -0.0089221302 [41] -0.0167954525 0.0941677849 -0.0369778480 -0.0223167099 -0.0192400908 [46] -0.0111082376 -0.0131724159 -0.0095195235 0.0032406527 0.0102838775 [51] 0.0466611197 0.0009891669 0.0115519843 -0.0326276165 0.0032508107 [56] -0.0080511336 0.0174588230 0.0034611110 0.0069691722 > (mypacf <- c(rpacf$acf)) [1] -0.1435085516 -0.1806361721 0.0859049008 -0.0082261252 -0.0616078660 [6] -0.0578545101 -0.1765191115 -0.0009504574 0.3138770810 0.0381316954 [11] 0.1787663710 -0.0244508127 -0.0054770339 -0.1030149141 0.1479448883 [16] -0.0099375172 -0.0569232260 -0.1594241545 -0.1690624224 -0.0940680405 [21] 0.0332340617 0.0249601627 -0.0586144196 -0.1246357142 -0.0318557937 [26] -0.0576062294 0.0965842690 0.0056923270 0.0057857549 -0.0396133137 [31] -0.1108212623 0.0221410728 0.1191741419 -0.0230638274 -0.0531753387 [36] -0.0736985032 -0.0132995647 -0.0057832294 0.0171416021 0.0041852139 [41] 0.0458422079 -0.1132780797 0.0429267238 -0.0861812743 -0.0547926635 [46] -0.0356960842 -0.0208884883 -0.0227571007 0.0132537975 -0.0195164805 [51] 0.0014170972 -0.0471403616 0.0213196564 0.0157998539 0.0545499927 [56] 0.0097303551 0.0072661702 -0.0488923581 > 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/337jb1292666989.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/47phh1292666989.tab") > > try(system("convert tmp/106261292666989.ps tmp/106261292666989.png",intern=TRUE)) character(0) > try(system("convert tmp/206261292666989.ps tmp/206261292666989.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.638 0.336 1.336