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(153.4,159.5,157.4,169.1,172.6,161.7,159.2,157.4,153.9,144.8,142.2,140.1,143.4,153.3,166.9,170.6,182.8,170.3,156.6,155.2,154.7,151.6,152.1,153.2,149.5,149.7,144.3,140,137.8,132.2,128.9,123.1,120.4,122.8,126,124.5,120.6,114.7,111.7,109.1,108,107.7,99.9,103.7,103.4,103.4,104.7,105.8,105.3,103,103.8,103.4,105.8,101.4,97,94.3,96.6,97.1,95.7,96.9,97.4,95.3,93.6,91.5,93.1,91.7,94.3,93.9,90.9,88.3,91.3,91.7,92.4,92,95.6,95.8,96.4,99,107,109.7,116.2,115.9,113.8,112.6,113.7,115.9,110.3,111.3,113.4,108.2,104.8,106,110.9,115,118.4,121.4,128.8,131.7,141.7,142.9,139.4,134.7,125,113.6,111.5,108.5,112.3,116.6,115.5,120.1,132.9,128.1,129.3,132.5,131,124.9,120.8,122,122.1,127.4,135.2,137.3,135,136,138.4,134.7,138.4,133.9,133.6,141.2,151.8,155.4,156.6,161.6,160.7,156,159.5,168.7,169.9,169.9,185.9) > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '0.0' > 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/1spj11198166023.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/24bzt1198166023.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.317949767 0.102628599 0.097910724 -0.063666304 [6] -0.234805822 -0.129779373 -0.074969321 -0.079239923 -0.009676140 [11] 0.101513636 0.138319658 0.141296456 0.210951717 0.139577227 [16] -0.076896973 -0.003376303 -0.038345505 0.050375139 0.094055953 [21] 0.118774543 0.086122488 0.056683798 -0.045398057 -0.051222198 [26] -0.094314614 -0.061891772 0.012781549 -0.055054435 -0.081923001 [31] 0.051901790 0.081204838 0.150022971 0.082027880 0.002546125 [36] -0.012306559 0.029907498 -0.045865176 -0.114742689 -0.071586241 [41] 0.004892015 -0.056524793 0.023274173 -0.027191501 0.063791745 [46] 0.029170673 0.045227454 -0.043609575 0.003677512 > (mypacf <- c(rpacf$acf)) [1] 3.179498e-01 1.709347e-03 7.207909e-02 -1.291346e-01 -2.072238e-01 [6] 2.617151e-03 -3.165657e-03 -1.718392e-02 5.640554e-03 6.661436e-02 [11] 8.363941e-02 6.494451e-02 1.312372e-01 2.697675e-02 -1.396049e-01 [16] 8.431858e-02 -7.606005e-03 2.055121e-01 9.218661e-02 4.535854e-02 [21] 2.011913e-02 -1.196282e-02 -8.010822e-02 -2.051044e-02 -7.450839e-02 [26] 1.748252e-02 5.841881e-02 -7.076665e-02 -1.061276e-01 -1.253214e-03 [31] 4.323655e-03 8.341552e-02 -4.654279e-02 -9.346926e-02 2.094133e-02 [36] 1.208304e-01 6.319069e-03 -1.413236e-01 -5.888995e-02 3.117836e-02 [41] 1.709387e-02 1.246881e-01 -1.567769e-01 8.373249e-02 -2.500678e-02 [46] 4.229230e-02 -3.220977e-02 4.147146e-05 > 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/350tr1198166023.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/41uxb1198166023.tab") > > system("convert tmp/1spj11198166023.ps tmp/1spj11198166023.png") > system("convert tmp/24bzt1198166023.ps tmp/24bzt1198166023.png") > > > proc.time() user system elapsed 0.846 0.316 0.954