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(721.8,836.7,817.8,804.3,773.3,789.6,882.5,868.9,885.7,880.6,846.2,875.4,799.6,946.3,987.3,892.4,885.1,937.1,935.9,944.2,930.9,874.0,891.9,902.2,767.0,912.5,918.6,713.4,849.9,875.9,1010.9,1049.2,900.5,1111.6,898.2,1034.3,996.7,1188.9,1092.5,952.0,959.1,846.1,903.0,1089.5,879.9,1057.0,932.6,745.5,817.2,808.3,832.9,801.2,773.1,710.8,820.4,814.9,833.5,864.3,844.9,733.6) > par5 = '12' > par4 = '2' > par3 = '0' > par2 = '1' > par1 = '60' > #'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/1rlf71196246084.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/2hc9e1196246084.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.611109002 0.595700911 0.432145508 0.219578516 [6] 0.170739279 0.096827028 -0.017013541 -0.150728462 -0.348096455 [11] -0.446676797 -0.494912021 -0.551612152 -0.316116868 -0.367566025 [16] -0.196970972 -0.204592828 -0.160643229 -0.090652240 -0.047437605 [21] 0.095733936 0.125917227 0.125943382 0.182957238 0.101547534 [26] 0.048168515 0.101117880 0.002985891 0.036100303 0.032499989 [31] -0.014620810 -0.001840962 -0.028616027 -0.025549463 -0.010327947 [36] -0.005097734 > (mypacf <- c(rpacf$acf)) [1] 0.611109002 0.354717410 -0.035662967 -0.281873126 0.008845061 [6] 0.113646303 -0.115620367 -0.322081714 -0.385467749 -0.104103389 [11] 0.130423529 -0.115884068 0.262077194 -0.059616915 0.117582626 [16] -0.145792655 -0.030478207 -0.061947134 -0.162666996 -0.011030534 [21] -0.156269857 -0.116624699 0.129696762 0.028102441 -0.007761234 [26] -0.083560871 0.011318261 -0.109907339 0.089172227 -0.086153182 [31] -0.026119676 0.043262351 -0.083000428 0.010957227 0.004206609 > 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/3b9lq1196246084.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/4ruz21196246084.tab") > > system("convert tmp/1rlf71196246084.ps tmp/1rlf71196246084.png") > system("convert tmp/2hc9e1196246084.ps tmp/2hc9e1196246084.png") > > > proc.time() user system elapsed 0.912 0.329 1.055