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(7.55,7.55,7.59,7.59,7.59,7.57,7.57,7.59,7.6,7.64,7.64,7.76,7.76,7.76,7.77,7.83,7.94,7.94,7.94,8.09,8.18,8.26,8.28,8.28,8.28,8.29,8.3,8.3,8.31,8.33,8.33,8.34,8.48,8.59,8.67,8.67,8.67,8.71,8.72,8.72,8.72,8.74,8.74,8.74,8.74,8.79,8.85,8.86,8.87,8.92,8.96,8.97,8.99,8.98,8.98,9.01,9.01,9.03,9.05,9.05) > par7 = '0.95' > par6 = 'MA' > par5 = '12' > par4 = '0' > par3 = '2' > par2 = '1' > par1 = '36' > #'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/19j5y1259770599.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/2esrn1259770599.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.28064516 -0.20403226 -0.09596774 0.06209677 0.24112903 [7] -0.21532258 -0.12822581 0.12419355 0.05403226 -0.07177419 -0.15806452 [13] 0.05564516 0.29354839 -0.01935484 -0.21935484 -0.07822581 0.19032258 [19] 0.15161290 -0.15564516 -0.18387097 0.15967742 -0.02096774 0.06451613 [25] -0.12903226 0.04112903 0.13306452 -0.05887097 -0.12016129 -0.05967742 [31] 0.23306452 -0.02500000 -0.08548387 -0.04032258 0.03709677 0.03306452 [37] 0.01774194 > (mypacf <- c(rpacf$acf)) [1] -0.280645161 -0.306971569 -0.307942338 -0.204257593 0.118503233 [6] -0.132980388 -0.199157112 -0.041495817 -0.061699568 -0.184818993 [11] -0.266460634 -0.234872093 0.040575815 0.095558740 -0.042331548 [16] -0.127314956 -0.016099958 0.075621308 0.039432665 -0.067878704 [21] 0.078459371 -0.122411450 0.054521128 0.066301299 0.089136947 [26] 0.029631632 0.047836499 -0.019270588 -0.093226395 0.079400075 [31] -0.099340897 -0.046322475 0.092253813 0.048689828 -0.119125826 [36] 0.008001675 > 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/340rv1259770599.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/42dxl1259770599.tab") > > system("convert tmp/19j5y1259770599.ps tmp/19j5y1259770599.png") > system("convert tmp/2esrn1259770599.ps tmp/2esrn1259770599.png") > > > proc.time() user system elapsed 0.550 0.312 0.644