R version 2.6.0 (2007-10-03) Copyright (C) 2007 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(105.3,101.3,108.4,107.4,109.1,109.5,111.4,110.1,117.0,129.6,113.5,113.3,110.1,107.4,110.1,112.5,106.0,117.6,117.8,113.5,121.2,130.4,115.2,117.9,110.7,107.6,124.3,115.1,112.5,127.9,117.4,119.3,130.4,126.0,125.4,130.5,115.9,108.7,124.0,119.4,118.6,131.3,111.1,124.8,132.3,126.7,131.7,130.9,122.1,113.2,133.6,119.2,129.4,131.4,117.1,130.5,132.3,140.8,137.5,128.6,126.7,120.8,139.3,128.6,131.3,136.3,128.5) > par5 = '12' > par4 = '0' > par3 = '0' > 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: 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/1y2us1196784116.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/2re4o1196784116.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.534449532 0.449945744 0.509269393 0.245379209 [6] 0.336898425 0.421372546 0.241057647 0.202190615 0.374106493 [11] 0.232175572 0.333202722 0.551850642 0.222827260 0.241211958 [16] 0.208753374 -0.009242479 0.113168856 0.152678875 -0.006692247 [21] 0.011013082 0.071354052 0.001542191 0.120577495 0.186979953 [26] 0.001815882 0.030429792 -0.020543108 -0.185882461 -0.078400247 [31] -0.067488030 -0.140119295 -0.114319771 -0.145310232 -0.170234857 [36] -0.074410361 -0.019755056 > (mypacf <- c(rpacf$acf)) [1] 0.534449532 0.230008107 0.297351091 -0.221674396 0.204648664 [6] 0.189248667 -0.064160244 -0.173176126 0.336289936 -0.006404775 [11] 0.157487436 0.267291994 -0.268081838 -0.108586884 -0.200535643 [16] -0.053542514 -0.006874071 0.026720598 -0.040684595 -0.035633643 [21] -0.063522851 0.149772616 -0.038841802 -0.048769089 0.018465291 [26] -0.031017161 -0.013545519 -0.134160505 0.002709573 0.033083396 [31] 0.061187880 -0.103127327 -0.071896945 -0.032488195 0.014165752 [36] 0.038077459 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > 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 1:par1) { + 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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/3y4eu1196784116.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-1,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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/4jjd61196784116.tab") > > system("convert tmp/1y2us1196784116.ps tmp/1y2us1196784116.png") > system("convert tmp/2re4o1196784116.ps tmp/2re4o1196784116.png") > > > proc.time() user system elapsed 0.804 0.321 0.920