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(106.70,110.20,125.90,100.10,106.40,114.80,81.30,87.00,104.20,108.00,105.00,94.50,92.00,95.90,108.80,103.40,102.10,110.10,83.20,82.70,106.80,113.70,102.50,96.60,92.10,95.60,102.30,98.60,98.20,104.50,84.00,73.80,103.90,106.00,97.20,102.60,89.00,93.80,116.70,106.80,98.50,118.70,90.00,91.90,113.30,113.10,104.10,108.70,96.70,101.00,116.90,105.80,99.00,129.40,83.00,88.90,115.90,104.20,113.40,112.20) > par5 = '12' > par4 = '1' > par3 = '0' > 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/1iwb81197901964.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/21y9c1197901964.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.391767179 0.386418401 0.404159552 0.198638617 [6] 0.292481324 0.152710543 0.006410638 -0.021801321 -0.044998367 [11] -0.033133142 -0.113980975 -0.096487594 -0.104535723 -0.005188823 [16] 0.062382587 -0.163064067 0.053424832 0.049195889 -0.030711484 [21] 0.127268706 0.027308559 -0.092390204 0.071709663 -0.086433675 [26] -0.165811116 -0.130783006 -0.217989400 -0.077337592 -0.239310241 [31] -0.212447960 -0.219370072 -0.146231173 -0.124288438 -0.144653052 [36] -0.077679814 -0.119303516 -0.029866189 0.070459041 -0.082663820 [41] 0.002240533 0.009366206 0.015771907 0.072739663 -0.015098908 [46] -0.015490195 -0.066328384 -0.017075588 > (mypacf <- c(rpacf$acf)) [1] 0.391767179 0.275170459 0.238525919 -0.085655288 0.120404094 [6] -0.075755568 -0.167631514 -0.146041611 0.010775324 0.056491400 [11] -0.069599766 0.014681164 0.012371624 0.151064367 0.102331589 [16] -0.276115586 0.115067175 0.084083525 -0.081757188 -0.002423329 [21] 0.075131738 -0.168387333 0.042828027 -0.142148121 -0.170547363 [26] -0.002927001 -0.028877081 0.163235009 -0.227936775 0.051324047 [31] -0.025988277 0.037037558 -0.075365626 -0.026770648 -0.019330096 [36] 0.024380600 0.039855642 -0.072589290 0.045181552 -0.043035639 [41] -0.065788567 0.050535160 0.002838454 0.072643272 -0.096341560 [46] -0.082416979 0.003767189 > 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/37ogy1197901964.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/4kr0d1197901964.tab") > > system("convert tmp/1iwb81197901964.ps tmp/1iwb81197901964.png") > system("convert tmp/21y9c1197901964.ps tmp/21y9c1197901964.png") > > > proc.time() user system elapsed 0.832 0.318 0.929