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 = '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/1c0fx1242295619.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/2eaz61242295619.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.292719051 -0.038056568 -0.075379504 -0.076389978 [6] -0.090319753 -0.046943201 -0.013348406 0.031227795 -0.033917778 [11] -0.082775804 -0.017667143 0.071895907 0.046108061 0.052387764 [16] -0.055345361 -0.102496193 0.071042311 0.116772020 0.069344345 [21] 0.061089835 -0.019374337 -0.057758501 -0.056784940 -0.091477876 [26] -0.096963964 -0.063046186 -0.017639459 -0.024694320 -0.020167951 [31] 0.028330180 0.079135330 0.031200111 -0.051801781 -0.057749273 [36] -0.030614128 0.004041895 0.186208647 0.081290084 0.033078023 [41] -0.049877728 -0.098735754 -0.069616574 -0.055677571 -0.029096110 [46] 0.101393439 0.096368754 0.021210723 0.015263231 > (mypacf <- c(rpacf$acf)) [1] 0.292719051 -0.135337313 -0.025754205 -0.054502703 -0.066786278 [6] -0.012248604 -0.014636760 0.027049451 -0.071513216 -0.062761504 [11] 0.019685402 0.061356039 -0.003837469 0.042433162 -0.097396614 [16] -0.056029738 0.144712373 0.054569060 0.024403211 0.035181887 [21] -0.045325217 -0.005993484 -0.002288898 -0.066506075 -0.085880396 [26] -0.058211538 0.016114525 -0.029887361 -0.027883142 0.018519731 [31] 0.011759000 -0.024281303 -0.027594721 -0.037781407 -0.026905493 [36] 0.018817437 0.199533998 -0.046213027 0.045721419 -0.065042703 [41] -0.046169751 0.025125450 -0.027347267 -0.015096535 0.100185823 [46] 0.058744008 0.018895994 0.011426058 > 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/3yknh1242295619.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/4adax1242295619.tab") > > system("convert tmp/1c0fx1242295619.ps tmp/1c0fx1242295619.png") > system("convert tmp/2eaz61242295619.ps tmp/2eaz61242295619.png") > > > proc.time() user system elapsed 0.565 0.306 0.695