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(3.27,3.27,3.27,3.27,3.27,3.28,3.32,3.34,3.34,3.35,3.35,3.35,3.35,3.35,3.4,3.42,3.42,3.42,3.42,3.42,3.42,3.42,3.42,3.42,3.42,3.42,3.43,3.47,3.51,3.52,3.52,3.52,3.52,3.52,3.52,3.52,3.52,3.52,3.58,3.6,3.61,3.61,3.61,3.63,3.68,3.69,3.69,3.69,3.69,3.69,3.69,3.69,3.69,3.78,3.79,3.79,3.8,3.8,3.8,3.8,3.81,3.95,3.99,4,4.06,4.16,4.19,4.2,4.2,4.2,4.2,4.2,4.23,4.38,4.43,4.44,4.44,4.44,4.44,4.44,4.45,4.45,4.45,4.45,4.45,4.45,4.45,4.45,4.46,4.46,4.46,4.48,4.58,4.67,4.68,4.68,4.69,4.69,4.69,4.69,4.69,4.69,4.69,4.73,4.78,4.79,4.79,4.8,4.8,4.81,5.16,5.26,5.29,5.29,5.29,5.3,5.3,5.3,5.3,5.3,5.3,5.3,5.3,5.35,5.44,5.47,5.47,5.48,5.48,5.48,5.48) > 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: 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/1e2zq1242295467.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/2u3yb1242295467.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.97824402 0.95490361 0.93109553 0.90694178 0.88264911 [7] 0.85819818 0.83449304 0.81239468 0.79065906 0.76861972 0.74629727 [13] 0.72346649 0.69981925 0.67543844 0.65101397 0.62649039 0.60194989 [19] 0.57659449 0.55026465 0.52374016 0.49850736 0.48005716 0.46154155 [25] 0.44274754 0.42399604 0.40509595 0.38627875 0.36865213 0.35205156 [31] 0.33521765 0.31784100 0.29974486 0.28108720 0.26214488 0.24293353 [37] 0.22356450 0.20371059 0.18295761 0.16418095 0.14721469 0.13056154 [43] 0.11383174 0.09692208 0.08027490 0.06402513 0.04716663 0.02957145 [49] 0.01148983 > (mypacf <- c(rpacf$acf)) [1] 0.978244023 -0.047811930 -0.021517908 -0.019661449 -0.015268835 [6] -0.016244729 0.004585243 0.023432870 -0.006595170 -0.020707279 [11] -0.019357769 -0.024549447 -0.031363694 -0.028283885 -0.012282733 [16] -0.016111060 -0.015545083 -0.034977830 -0.038923046 -0.021673503 [21] 0.012653580 0.141243191 -0.024123718 -0.023009346 -0.016621889 [26] -0.020216143 -0.012058310 0.022685053 0.022457440 -0.018764562 [31] -0.029738524 -0.033787285 -0.032085397 -0.025486307 -0.019893768 [36] -0.012889232 -0.027486889 -0.041662247 0.020501647 0.014053523 [41] -0.013780246 -0.010132089 0.004914411 -0.013866435 -0.010772909 [46] -0.029264916 -0.032699536 -0.025154141 > 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/383531242295467.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/4k5s01242295467.tab") > > system("convert tmp/1e2zq1242295467.ps tmp/1e2zq1242295467.png") > system("convert tmp/2u3yb1242295467.ps tmp/2u3yb1242295467.png") > > > proc.time() user system elapsed 0.565 0.313 0.678