R version 2.11.1 (2010-05-31) Copyright (C) 2010 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.35,1.91,1.31,1.19,1.3,1.14,1.1,1.02,1.11,1.18,1.24,1.36,1.29,1.73,1.41,1.15,1.31,1.15,1.08,1.1,1.14,1.24,1.33,1.49,1.38,1.96,1.36,1.24,1.35,1.23,1.09,1.08,1.33,1.35,1.38,1.5,1.47,2.09,1.52,1.29,1.52,1.27,1.35,1.29,1.41,1.39,1.45,1.53,1.45,2.11,1.53,1.38,1.54,1.35,1.29,1.33,1.47,1.47,1.54,1.59,1.5,2,1.51,1.4,1.62,1.44,1.29,1.28,1.4,1.39,1.46,1.49) > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > 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/rcomp/tmp/1mumt1289775081.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/rcomp/tmp/2mumt1289775081.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.00000000 -0.40065581 -0.09797820 0.22293250 -0.13230763 0.01297152 [7] -0.20998402 0.04150852 -0.13638064 0.18704490 -0.06287128 -0.31898304 [13] 0.78491700 -0.29689193 -0.09665357 0.20123469 -0.11043058 -0.01466409 [19] -0.17185700 0.05118306 -0.12047658 0.16273792 -0.06216089 -0.24869136 [25] 0.65349910 -0.28566670 -0.04669639 0.13763102 -0.05474884 -0.02976253 [31] -0.14455209 0.04319330 -0.06760326 0.10623857 -0.05654845 -0.17361968 [37] 0.46795819 -0.19396990 -0.05382535 0.12631606 -0.06679479 -0.01874495 [43] -0.07381024 0.03528075 -0.07292812 0.08401277 -0.03642351 -0.10594028 [49] 0.28872651 > (mypacf <- c(rpacf$acf)) [1] -0.400655815 -0.307934492 0.063448884 -0.028186124 0.003904385 [6] -0.334676856 -0.259630775 -0.466795979 -0.064057201 -0.129340620 [11] -0.667866531 0.255686941 0.123771146 0.098850554 -0.021490014 [16] -0.049622657 -0.104966173 -0.024900607 -0.014595721 0.042586024 [21] 0.078192278 -0.023369041 -0.061438927 0.072913416 -0.105705286 [26] 0.025520451 -0.141505300 0.009018197 0.009523360 0.079445815 [31] -0.066186214 0.115622691 -0.060644797 0.006191318 0.021885544 [36] -0.189834688 -0.018823417 -0.086001282 0.035136358 -0.137247536 [41] -0.143911125 -0.055703903 0.110444174 -0.058176277 -0.086302184 [46] -0.034893012 0.075638481 -0.040603533 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/30m121289775081.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/rcomp/tmp/4tv051289775081.tab") > > try(system("convert tmp/1mumt1289775081.ps tmp/1mumt1289775081.png",intern=TRUE)) character(0) > try(system("convert tmp/2mumt1289775081.ps tmp/2mumt1289775081.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.76 0.50 1.21