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(8715.1 + ,8919.9 + ,10085.8 + ,9511.7 + ,8991.3 + ,10311.2 + ,8895.4 + ,7449.8 + ,10084.0 + ,9859.4 + ,9100.1 + ,8920.8 + ,8502.7 + ,8599.6 + ,10394.4 + ,9290.4 + ,8742.2 + ,10217.3 + ,8639.0 + ,8139.6 + ,10779.1 + ,10427.7 + ,10349.1 + ,10036.4 + ,9492.1 + ,10638.8 + ,12054.5 + ,10324.7 + ,11817.3 + ,11008.9 + ,9996.6 + ,9419.5 + ,11958.8 + ,12594.6 + ,11890.6 + ,10871.7 + ,11835.7 + ,11542.2 + ,13093.7 + ,11180.2 + ,12035.7 + ,12112.0 + ,10875.2 + ,9897.3 + ,11672.1 + ,12385.7 + ,11405.6 + ,9830.9 + ,11025.1 + ,10853.8 + ,12252.6 + ,11839.4 + ,11669.1 + ,11601.4 + ,11178.4 + ,9516.4 + ,12102.8 + ,12989.0 + ,11610.2 + ,10205.5 + ,11356.2 + ,11307.1 + ,12648.6 + ,11947.2 + ,11714.1 + ,12192.5 + ,11268.8 + ,9097.4 + ,12639.8 + ,13040.1 + ,11687.3 + ,11191.7 + ,11391.9 + ,11793.1 + ,13933.2 + ,12778.1 + ,11810.3 + ,13698.4 + ,11956.6 + ,10723.8 + ,13938.9 + ,13979.8 + ,13807.4 + ,12973.9 + ,12509.8 + ,12934.1 + ,14908.3 + ,13772.1 + ,13012.6 + ,14049.9 + ,11816.5 + ,11593.2 + ,14466.2 + ,13615.9 + ,14733.9 + ,13880.7 + ,13527.5 + ,13584.0 + ,16170.2 + ,13260.6 + ,14741.9 + ,15486.5 + ,13154.5 + ,12621.2 + ,15031.6 + ,15452.4 + ,15428.0 + ,13105.9 + ,14716.8 + ,14180.0 + ,16202.2 + ,14392.4 + ,15140.6 + ,15960.1 + ,14351.3 + ,13230.2 + ,15202.1 + ,17056.0 + ,16077.7 + ,13348.2 + ,16402.4 + ,16559.1 + ,16579.0 + ,17561.2 + ,16129.6 + ,18484.3 + ,16402.6 + ,14032.3 + ,17109.1 + ,17157.2 + ,13879.8 + ,12362.4) > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > par3 = '1' > 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/15fey1260866367.ps",horizontal=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/2f5t21260866367.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.000000000 -0.279767197 -0.356957997 0.128566934 0.064961363 [6] -0.083217727 0.182776197 -0.173696597 0.189440639 -0.006451385 [11] -0.356048840 -0.112715753 0.696040836 -0.200544519 -0.274295468 [16] 0.030855232 0.072705339 -0.050229738 0.122915799 -0.101350416 [21] 0.171311236 -0.069361153 > (mypacf <- c(rpacf$acf)) [1] -0.279767197 -0.472185491 -0.210207253 -0.186376957 -0.186780545 [6] 0.126339225 -0.132307689 0.345225168 0.172534451 -0.203897646 [11] -0.586434431 0.229184432 0.163257514 0.164667648 -0.076823487 [16] -0.057150039 -0.105766188 -0.094138384 0.072127393 -0.008859264 [21] -0.014182908 > 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/3mm181260866367.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/43p7a1260866367.tab") > > try(system("convert tmp/15fey1260866367.ps tmp/15fey1260866367.png",intern=TRUE)) character(0) > try(system("convert tmp/2f5t21260866367.ps tmp/2f5t21260866367.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.533 0.299 1.719