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(200.7,146.5,143.6,141.5,137.5,138.7,135.5,136.4,112.1,109,123.8,151.2,139.2,115.7,147.6,126.1,122.8,137.3,142,137.4,89.4,108,117.7,127.3,121,104.1,119.5,116.7,96.1,125,118.8,114.9,79.3,90.5,87.8,109.4,88.9,97.4,112,86.8,82.9,105.2,89.1,85.5,87.1,85.2,88.2,104,96.4,82.3,114.1,88.9,93.6,101.8,96.6,93.7,68.4,68.7,81.2,85.1,75.4,71.6,83,72.3,90.2,89,84.9,90.9,46.6,55.4,88.7,76,76.9,72.1,90,92.3,78,93.9,84.5,80.4,60.5,75.3,91.5,105.2,92.7) > par5 = '12' > par4 = '1' > par3 = '1' > 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/17v291228249224.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/2sip81228249224.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.410829121 -0.123112889 0.247431269 -0.054969857 [6] -0.119545459 0.128284310 -0.144325838 0.188133979 -0.162664338 [11] -0.021761079 0.176388389 -0.254409695 0.116911933 0.001626975 [16] -0.051044746 -0.004929392 0.108408273 -0.208844748 0.143012577 [21] 0.075322357 -0.144169698 -0.073875277 0.270582146 -0.188606581 [26] -0.090983287 0.152103966 0.009694061 -0.140571942 0.069738406 [31] 0.065075171 0.008806235 -0.074459298 0.082940849 0.012354016 [36] -0.062301069 -0.029610596 > (mypacf <- c(rpacf$acf)) [1] -0.41082912 -0.35116293 0.04778767 0.07962552 -0.04366257 0.02417814 [7] -0.16104169 0.15625310 -0.08856741 -0.06920057 0.07319816 -0.21003848 [13] 0.05722341 -0.14022110 0.05139647 -0.08574409 0.08634072 -0.13517761 [19] -0.07205092 0.22330336 -0.13457703 -0.12055533 0.10452877 -0.06096732 [25] -0.11264304 -0.05549848 0.09787196 -0.18053731 0.07205091 0.01720739 [31] 0.03269664 0.10144138 0.03615074 -0.06189986 0.03389634 -0.08574182 > 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/30ym11228249224.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/4vehj1228249224.tab") > > system("convert tmp/17v291228249224.ps tmp/17v291228249224.png") > system("convert tmp/2sip81228249224.ps tmp/2sip81228249224.png") > > > proc.time() user system elapsed 0.541 0.320 0.643