R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(1.88,1.87,1.88,1.87,1.88,1.87,1.87,1.87,1.87,1.87,1.87,1.87,1.87,1.87,1.87,1.87,1.87,1.87,1.87,1.87,1.88,1.88,1.87,1.87,1.87,1.87,1.87,1.87,1.87,1.86,1.86,1.85,1.84,1.83,1.82,1.78,1.75,1.74,1.74,1.74,1.73,1.73,1.73,1.71,1.7,1.7,1.69,1.68,1.68,1.68,1.68,1.67,1.66,1.65,1.65,1.65) > par7 = '' > par6 = 'White Noise' > 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/rcomp/tmp/1rlrr1291642083.ps",horizontal=F,onefile=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/rcomp/tmp/2rlrr1291642083.ps",horizontal=F,onefile=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.955818414 0.907672634 0.853005115 0.800639386 [6] 0.745971867 0.694373402 0.639961637 0.581713555 0.519373402 [11] 0.458184143 0.398401535 0.335549872 0.274360614 0.219309463 [16] 0.162468031 0.104859335 0.049424552 -0.008056266 -0.067583120 [21] -0.123913043 -0.170524297 -0.202557545 -0.229475703 -0.252173913 [26] -0.271419437 -0.286700767 -0.302237852 -0.313299233 -0.324872123 [31] -0.334782609 -0.345971867 -0.355242967 -0.362851662 -0.368030691 [36] -0.367838875 -0.360741688 > (mypacf <- c(rpacf$acf)) [1] 0.9558184143 -0.0684657742 -0.0990990375 0.0034171570 -0.0531881029 [6] 0.0025067508 -0.0619487749 -0.0822836812 -0.0749795843 -0.0217494790 [11] -0.0208769741 -0.0858947084 -0.0272445838 0.0290527030 -0.0726103886 [16] -0.0597503212 -0.0216407130 -0.0824040000 -0.0781708762 -0.0201758452 [21] 0.0448437767 0.1065621233 0.0002871509 -0.0123457279 -0.0043369999 [26] 0.0140938201 -0.0371214255 -0.0149697682 -0.0633498759 -0.0321880421 [31] -0.0579450374 -0.0352087670 -0.0241877984 -0.0098810019 0.0377545147 [36] 0.0372612594 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/3nd7z1291642083.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/rcomp/tmp/4g4o21291642083.tab") > > try(system("convert tmp/1rlrr1291642083.ps tmp/1rlrr1291642083.png",intern=TRUE)) character(0) > try(system("convert tmp/2rlrr1291642083.ps tmp/2rlrr1291642083.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.650 0.410 1.039