R version 2.8.0 (2008-10-20) Copyright (C) 2008 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(35810356.5,35492936.3,38937434.1,40059102.8,37708710.2,41570965.7,36333563,34181220.1,42593543.9,43119727.6,38497690.9,45473273.4,38399780.4,38882302.6,44051120.6,41677559.9,40699203.5,44150027.6,38225518.7,35447405.7,43075518.3,42302792,39743541.7,44670641.2,37123384,37668266.4,46117528.8,42273156.4,39404153.2,45799994.5,38602505.2,39454830.1,47427901.4,46497980.9,45057149.4,50615569.2,43033396.2,46013056.5,54222266.3,46417306.4,51046271.8,51201279.6,43475288.7,44968981.1,53939345.4,54549319.7,54072107.3,58434230.1,51158751,50039368,57872617.4,51642978.8,54534465.9,56094697.8,48189983.1,47492381,52987449.1,55719803.5,53922860.5,54931231.9) > par5 = '12' > par4 = '0' > 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/1dyjz1228827177.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/2k8j71228827177.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.00000000 0.68607893 0.58582829 0.70561865 0.49934781 0.54933247 [7] 0.74459401 0.47970715 0.38328408 0.49670422 0.29860126 0.33741032 [13] 0.52113390 0.24718725 0.16771031 0.23899475 0.03884566 0.09713759 [19] 0.24021086 0.02551673 -0.02701293 0.03954814 -0.13000310 -0.07812042 [25] 0.03959825 -0.17248706 -0.19903717 -0.15041400 -0.29050238 -0.22574041 [31] -0.14025915 -0.28911006 -0.29166670 -0.26278993 -0.34781952 -0.27871280 [37] -0.19574306 -0.31011508 -0.31861039 -0.27614989 -0.34355084 -0.27169783 [43] -0.21157286 -0.29304013 -0.30171889 -0.27951988 -0.30383981 -0.25226972 [49] -0.18543234 -0.22112628 -0.21664331 -0.19323505 -0.19715081 -0.14932480 [55] -0.09909895 -0.10960659 -0.10931263 -0.09543497 -0.06884727 -0.03567363 > (mypacf <- c(rpacf$acf)) [1] 6.860789e-01 2.175041e-01 4.796959e-01 -2.872270e-01 4.047501e-01 [6] 3.363486e-01 -4.073668e-01 -2.480507e-01 1.260501e-01 -2.551627e-02 [11] 3.752407e-02 9.709278e-02 -2.796424e-01 -5.926502e-02 -1.599934e-01 [16] 2.831588e-02 7.880383e-02 -5.949571e-02 7.295429e-02 -2.673282e-02 [21] -4.151291e-02 1.634719e-02 -6.912276e-02 -9.305331e-02 -8.035429e-02 [26] 7.851242e-03 -8.506368e-04 5.792804e-02 -9.691806e-02 -6.877161e-02 [31] 6.373300e-02 1.211559e-02 -1.069726e-01 1.467629e-01 -2.740408e-02 [36] 7.791183e-02 -3.813633e-02 -1.606668e-01 1.386154e-01 -1.080887e-01 [41] -3.687315e-02 4.365724e-05 -3.059004e-02 -6.227678e-02 4.062408e-03 [46] -2.271750e-02 4.968541e-03 4.307117e-02 6.416516e-02 1.419045e-01 [51] -1.166802e-01 3.820732e-02 -2.868589e-02 -2.129654e-03 -5.034695e-02 [56] 5.329142e-02 8.433476e-03 3.889642e-03 9.800387e-03 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > 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 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/html/rcomp/tmp/3fuvc1228827177.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/html/rcomp/tmp/4b3pw1228827177.tab") > > system("convert tmp/1dyjz1228827177.ps tmp/1dyjz1228827177.png") > system("convert tmp/2k8j71228827177.ps tmp/2k8j71228827177.png") > > > proc.time() user system elapsed 0.575 0.296 0.696