R version 2.8.0 (2008-10-20) Copyright (C) 2008 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(77.7,78.89,90.2,77.26,80.76,84.93,66.08,71.56,80.78,83.31,85.3,73.94,78.7,81.32,86.8,80.76,84.46,84.21,73.64,70.85,83.78,89.12,78.93,80.54,81.67,82.53,88.2,89.17,83.7,89.79,77.58,70.11,88.07,92.49,83.33,90.05,82.91,88.52,96.42,90.87,86.4,97.47,85.67,79.91,95.73,94.6,91.92,90.38,82.31,87.82,101.29,89.58,87.83,99.95,82.67,84.65,97.83,97.47,97.66,99.14,90.02,100.97,112.48,91.44,108.46,98.41,89.35,92.8,100.43,104.85,108.36,101.54,105.26,101.8,112.36,99.5,104.65,101.13,89.8,87.84,96.41,103.26,100.31,92.33,96.19,96.37,103.06,101.5,101.88,100.85,95.56,87.6,101.18,110.8,101.1,104.42,103.27,100.87,107.8,104.99,100.76,104.46,100.62,87.84,107.31,115.61,103.43,109.93,104.43,106.69,123.1,109.42,101.46,124.48,101.49,100.46,115.51,113.37,115.4,118.2,106.82,110.17,119.91,112.31,110.62,120.37,97.94,103.02,116.36,108.51,122.54,121.32,112.25,109.89,129.58,107.2,118.68,118.25,102.67,104.19,117.74,123.3,122.2,112.71,118.53,115.32,127.36,110.45,122.22,123.39,116.2,109.22,116.98,132.89,125.24,115.68) > par5 = '12' > par4 = '1' > par3 = '0' > par2 = '0.3' > par1 = '60' > #'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/185s81229247351.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/2nm7k1229247351.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.093350885 0.277726560 0.479549200 0.048504605 [6] 0.208381084 0.221934322 -0.148979060 0.126984611 0.074551429 [11] -0.223467526 -0.014039464 -0.152249153 -0.272942630 -0.011703449 [16] -0.138473704 -0.250069304 0.049136064 -0.058662598 -0.219958598 [21] 0.004680738 -0.095265946 -0.221134517 0.099521983 -0.237319676 [26] -0.111046216 0.138828068 -0.181186375 -0.059616630 0.071856647 [31] -0.184329613 0.004609305 0.089270228 -0.188717381 0.048962680 [36] 0.133172515 -0.177120133 0.103342696 0.016421043 -0.154889683 [41] 0.067794207 0.002282581 -0.186431313 0.188169952 -0.047193431 [46] -0.090528576 0.181824563 -0.093748354 -0.068438455 0.217875262 [51] -0.170989076 0.104220998 0.150044791 -0.074316181 0.147395141 [56] 0.067065187 -0.078992247 0.071230432 0.013937661 -0.062385822 [61] 0.111722882 > (mypacf <- c(rpacf$acf)) [1] 0.093350885 0.271377058 0.474065347 -0.046476099 -0.051087822 [6] 0.004621059 -0.258251096 -0.033439384 0.108079738 -0.108521042 [11] -0.147509360 -0.144989901 -0.114831393 0.087028850 0.196655651 [16] -0.024237231 0.006357055 0.088281089 -0.202081098 -0.198723057 [21] 0.041734130 -0.124026396 0.039165697 -0.134068116 -0.050396049 [26] 0.137072240 0.103096807 -0.030671306 -0.043199456 -0.031245695 [31] -0.142539927 -0.006863317 -0.003753521 -0.115654784 0.063441003 [36] -0.109642799 -0.041147738 0.057866734 0.020503948 -0.143937409 [41] 0.031533721 -0.057817939 0.060935360 -0.015949543 0.006565166 [46] -0.051584121 -0.040007591 -0.142392738 0.070462034 -0.013213043 [51] 0.156466241 -0.089198834 -0.029882944 0.043338009 -0.072719866 [56] -0.037817981 -0.062020596 -0.130381338 0.092737911 0.054007606 > 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/3uz501229247352.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/4sv011229247352.tab") > > system("convert tmp/185s81229247351.ps tmp/185s81229247351.png") > system("convert tmp/2nm7k1229247351.ps tmp/2nm7k1229247351.png") > > > proc.time() user system elapsed 0.608 0.327 0.737