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(376.974,377.632,378.205,370.861,369.167,371.551,382.842,381.903,384.502,392.058,384.359,388.884,386.586,387.495,385.705,378.67,377.367,376.911,389.827,387.82,387.267,380.575,372.402,376.74,377.795,376.126,370.804,367.98,367.866,366.121,379.421,378.519,372.423,355.072,344.693,342.892,344.178,337.606,327.103,323.953,316.532,306.307,327.225,329.573,313.761,307.836,300.074,304.198,306.122,300.414,292.133,290.616,280.244,285.179,305.486,305.957,293.886,289.441,288.776,299.149,306.532,309.914,313.468,314.901,309.16,316.15,336.544,339.196,326.738,320.838,318.62,331.533,335.378) > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '1' > par3 = '1' > 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: > 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/1ogxt1291929419.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/2ypew1291929419.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.1903792452 0.1909920839 0.3469251099 0.2127946138 [6] 0.1440062574 0.1473103102 0.0512927756 0.2101451744 -0.0023104357 [11] -0.1378377738 0.2496144647 0.0296992503 -0.0653319893 0.0924243560 [16] 0.0776437066 0.0450794039 0.0378806644 -0.0106125098 0.0526817234 [21] -0.0524853328 -0.2126093704 -0.1093387007 -0.0439068204 -0.2212838591 [26] -0.1891920039 -0.1426238648 -0.1935185029 -0.1527670266 -0.0964542651 [31] -0.1092486140 -0.0134574351 -0.1347005675 -0.0526165992 0.0187475982 [36] 0.0156496448 -0.0696533405 -0.0398692502 -0.0552251345 -0.0899764230 [41] -0.0696161468 -0.1351163755 -0.0795431543 -0.0495137971 -0.0362911972 [46] -0.0497685618 -0.0246746353 -0.0065233523 -0.0137250011 0.0182136749 [51] -0.0235941837 0.0280365401 0.0084458979 0.0055100590 -0.0063040909 [56] 0.0104283847 0.0029451079 -0.0035076309 0.0061890309 0.0001628681 > (mypacf <- c(rpacf$acf)) [1] 0.190379245 0.160567476 0.304432133 0.111490817 0.019159040 [6] -0.010417675 -0.090570396 0.152493712 -0.105604873 -0.209762363 [11] 0.249496153 0.008245426 -0.031245543 0.021320156 0.052677261 [16] 0.027725899 -0.027604059 -0.001508278 -0.096778662 -0.114286307 [21] -0.126867740 -0.172090594 0.047957986 -0.048708746 -0.054637240 [26] -0.033506569 -0.071060287 0.033160873 0.083860537 -0.009699294 [31] 0.036144718 -0.063880033 0.077419797 -0.028669131 0.115453300 [36] -0.012352623 -0.097934296 0.014677016 -0.071877521 0.002795865 [41] -0.092934228 -0.085288789 0.073346935 0.070259567 0.027418203 [46] -0.134499123 -0.024564083 -0.030596437 -0.029460629 -0.029751015 [51] -0.057382981 -0.018795429 0.059320653 -0.027911540 0.049727210 [56] 0.067117655 0.054585316 -0.013750021 -0.027158878 > 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/3k7v21291929419.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/4yiwk1291929420.tab") > > try(system("convert tmp/1ogxt1291929419.ps tmp/1ogxt1291929419.png",intern=TRUE)) character(0) > try(system("convert tmp/2ypew1291929419.ps tmp/2ypew1291929419.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.651 0.363 1.539