R version 2.6.1 (2007-11-26) 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(104.3,103.9,103.9,103.9,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.2,112.3,111.3,111.3,115.3,117.2,118.3,118.3,118.3,119.0,120.6,122.6,122.6,127.4,125.9,121.5,118.8,121.6,122.3,122.7,120.8,120.1,120.1,120.1,120.1,128.4,129.8,129.8,128.6,128.6,133.7,130.0,125.9,129.4,129.4,130.6,130.6,130.6,130.8,129.7,125.8,126.0,125.6,125.4,124.7,126.9,129.1) > 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/1fxvw1198164293.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/24sg21198164293.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.033422618 -0.230803478 -0.031303838 0.045181156 [6] 0.057912840 -0.144469593 -0.122781060 0.271107536 -0.035663235 [11] -0.268508272 -0.141060848 0.242803171 0.065726770 -0.224694817 [16] -0.239264383 0.145485765 0.079573931 -0.124432440 -0.083701155 [21] 0.155942910 0.105519326 -0.014331838 -0.075567723 0.219602053 [26] 0.054880124 0.000592559 -0.113835341 -0.011725802 0.103603421 [31] -0.130209037 -0.146602205 0.055147938 0.023910199 0.018375921 [36] -0.033663518 0.012290417 -0.025669356 -0.084277277 -0.111573071 [41] 0.051343778 0.050089924 0.029771925 -0.057034786 0.006770569 [46] 0.026040311 0.002835260 -0.002762245 0.113136496 > (mypacf <- c(rpacf$acf)) [1] 0.033422618 -0.232179911 -0.014855177 -0.006972566 0.048453863 [6] -0.148443733 -0.093792189 0.235515019 -0.127355130 -0.186174649 [11] -0.145697468 0.204842861 -0.087068137 -0.164064474 -0.208404118 [16] 0.041449968 -0.079540100 -0.072212803 -0.026680963 -0.027610889 [21] -0.036796101 0.093225272 0.083301650 0.077899548 -0.139277591 [26] 0.181524572 0.008020591 -0.101091367 -0.041165835 -0.114421785 [31] -0.041612992 -0.117034613 0.039750283 -0.018897565 0.058763290 [36] -0.009255049 -0.023335794 -0.073475423 -0.078407568 0.021793789 [41] -0.048956087 -0.004010388 -0.129032556 -0.029888039 -0.090516353 [46] -0.096318212 -0.040895847 0.012306715 > 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/3o8oz1198164293.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/4qozo1198164293.tab") > > system("convert tmp/1fxvw1198164293.ps tmp/1fxvw1198164293.png") > system("convert tmp/24sg21198164293.ps tmp/24sg21198164293.png") > > > proc.time() user system elapsed 1.521 0.547 1.615