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(16.46,16.49,16.59,16.58,16.60,16.55,16.57,16.51,16.50,16.49,16.44,16.26,16.33,16.72,16.75,16.74,16.84,16.79,16.66,16.69,16.84,16.86,16.76,16.72,16.29,16.29,16.46,16.54,16.70,16.82,16.88,16.89,16.92,16.88,16.91,16.80,16.78,17.03,17.18,17.12,17.11,17.14,17.17,17.21,17.22,17.19,17.15,17.10,17.21,17.33,17.30,17.33,17.35,17.43,17.46,17.50,17.54,17.56,17.44,17.41,17.72,17.79,17.83,17.76,17.95,17.91,17.96,17.98,17.89,17.88,17.91,17.51,17.63) > par8 = '' > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > par3 = '0' > 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/1k2dw1292855088.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/2k2dw1292855088.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.00000000 0.94974562 0.89991363 0.84935186 0.80046057 0.75653555 [7] 0.71617536 0.67313920 0.62693282 0.57922726 0.54176305 0.50261533 [13] 0.46077672 0.41422749 0.38643290 0.36044967 0.32798223 0.29731585 [19] 0.26214553 0.22370181 0.18942068 0.16922079 0.15004698 0.12973624 [25] 0.10134155 0.05312551 0.00719026 -0.03400777 -0.07292980 -0.11046013 [31] -0.14325198 -0.17111030 -0.19404365 -0.21718689 -0.23926235 -0.26296702 [37] -0.29427413 -0.32000572 -0.33298338 -0.34221222 -0.35291923 -0.36606405 [43] -0.37921470 -0.38325757 -0.37906987 -0.37402388 -0.35875627 -0.34164287 [49] -0.33914850 > (mypacf <- c(rpacf$acf)) [1] 0.9497456182 -0.0214639629 -0.0336628786 -0.0103263188 0.0237977325 [6] 0.0114533573 -0.0514629169 -0.0577105570 -0.0401101270 0.0787210498 [11] -0.0431802986 -0.0625221753 -0.0783309240 0.1755065210 0.0067613673 [16] -0.1109986574 -0.0204398146 -0.0471486132 -0.0273247355 -0.0039028410 [21] 0.0973233840 -0.0292552293 0.0025279238 -0.1023031529 -0.2553682938 [26] -0.0211623314 0.0578810090 -0.0180474489 -0.0927499794 0.0417935286 [31] 0.0393359562 0.0090881083 -0.0619083088 -0.0208279397 -0.0141409107 [36] -0.0937879993 0.0008182114 -0.0125973971 0.0288584636 0.0207338726 [41] -0.0474498284 -0.0462227357 0.1214000256 0.0725037807 -0.1254459457 [46] 0.0866226149 0.0940112968 -0.1438403456 > 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/35lbj1292855088.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/49l971292855088.tab") > > try(system("convert tmp/1k2dw1292855088.ps tmp/1k2dw1292855088.png",intern=TRUE)) character(0) > try(system("convert tmp/2k2dw1292855088.ps tmp/2k2dw1292855088.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.592 0.354 2.596