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(9.26,9.29,9.28,9.31,9.27,9.27,9.28,9.25,9.32,9.33,9.31,9.3,9.29,9.33,9.35,9.35,9.37,9.37,9.35,9.33,9.34,9.37,9.33,9.31,9.26,9.27,9.29,9.27,9.29,9.31,9.33,9.35,9.34,9.35,9.38,9.43,9.47,9.5,9.55,9.58,9.61,9.57,9.61,9.65,9.62,9.63,9.62,9.63,9.65,9.72,9.75,9.77,9.78,9.82,9.84,9.9,9.94,9.96,10.03,10.03,10.12,10.12,10.05,10.14,10.17,10.2,10.2,10.35,10.43,10.52,10.57,10.57,10.57,10.65,10.57,10.61,10.63,10.71,10.72,10.77,10.79,10.82,10.9,10.83,10.92,10.91,10.88,10.87,11,10.99,11.03,11.04,10.99,10.9,11,10.99,10.92,10.98,11.15,11.19,11.33,11.38,11.4,11.45,11.56,11.61,11.82,11.77,11.85,11.82,11.92,11.86,11.87,11.94,11.86,11.92,11.83,11.91,11.93,11.99,11.96,12.12,11.85,12.01,12.1,12.21,12.31,12.31,12.39,12.35,12.41,12.51) > 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: Write here your technical program description (don't use hard returns!) > 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 (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/1sqbp1246613394.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > racf <- acf(x,par1,main='Autocorrelation',xlab='lags',ylab='ACF') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2cyax1246613394.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.245839187 0.222269332 -0.028451456 0.093357539 [6] -0.062693576 0.122932417 0.036839260 -0.013249305 -0.002829865 [11] -0.027639049 0.013617164 -0.060555028 0.086643064 -0.192322637 [16] 0.144022399 -0.171248423 0.010335541 0.082207503 0.020185252 [21] 0.056181420 0.126463285 0.021005913 -0.037435438 -0.018419927 [26] 0.048845521 -0.005332776 0.084297402 -0.067118577 0.072696689 [31] 0.041194782 0.123518459 -0.169126856 0.144629246 -0.100238391 [36] 0.043935334 -0.050550361 0.117718121 -0.113902408 0.080852339 [41] -0.016241117 -0.031571726 0.056684608 -0.036366819 -0.029564853 [46] -0.078339996 0.052249520 -0.089845303 0.085990456 > (mypacf <- c(rpacf$acf)) [1] -0.245839187 0.172242212 0.064850198 0.068265707 -0.042288443 [6] 0.079703590 0.103467813 -0.026615172 -0.045572564 -0.051950800 [11] 0.009645140 -0.048505299 0.052102945 -0.160268548 0.065086803 [16] -0.063374332 -0.078585956 0.155713632 0.066360373 0.091869422 [21] 0.157986564 0.049083614 -0.056530763 -0.116386871 -0.005292982 [26] -0.011014964 0.080786109 -0.120930650 0.069426809 0.126312191 [31] 0.176324279 -0.135296658 -0.028034242 0.021007207 0.063214915 [36] -0.053399179 0.053593245 -0.075439218 0.017285064 -0.041507232 [41] -0.054850895 0.019991687 0.046557284 -0.058240958 -0.027105198 [46] 0.006474951 0.013265360 -0.033440427 > 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/34vxn1246613394.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/45pfd1246613394.tab") > > system("convert tmp/1sqbp1246613394.ps tmp/1sqbp1246613394.png") > system("convert tmp/2cyax1246613394.ps tmp/2cyax1246613394.png") > > > proc.time() user system elapsed 0.573 0.335 0.979