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 = '1' > par3 = '1' > par2 = '1' > par1 = '36' > #'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/1upqr1228658263.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/2fsrw1228658263.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.0000000000 -0.4068692572 -0.0007050109 0.1837347810 -0.0969338065 [6] 0.0093531774 0.1152389102 -0.0595661023 0.0810443342 0.0683209598 [11] -0.1586155278 0.1858790912 -0.2098236539 0.0393863585 0.0891930357 [16] -0.0217458941 -0.1772579189 0.0914093091 0.0598594402 -0.1519628033 [21] 0.0602040794 -0.0187485419 -0.0028496844 -0.0841126999 0.0793650700 [26] -0.2182341167 0.1440035494 -0.0885935544 -0.0072370955 0.0100165504 [31] -0.1189212383 0.0803449363 0.0521583747 -0.0771883697 0.0120150287 [36] 0.0381595507 -0.0337996960 > (mypacf <- c(rpacf$acf)) [1] -0.406869257 -0.199228387 0.127700314 0.050619885 0.010787391 [6] 0.105930651 0.050846355 0.105891286 0.136803130 -0.086641729 [11] 0.074225924 -0.196655875 -0.108596193 -0.013238771 0.080491113 [16] -0.184763361 -0.140874869 0.109975625 0.001218383 -0.017164140 [21] 0.005634632 0.023012084 -0.080636985 0.010561577 -0.223492570 [26] -0.040406582 -0.056805708 -0.051039837 -0.083921324 -0.062200039 [31] 0.051928258 0.109385116 0.096773374 0.116321649 -0.048034883 [36] 0.053346377 > 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/3x9n41228658263.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/4ugzf1228658263.tab") > > system("convert tmp/1upqr1228658263.ps tmp/1upqr1228658263.png") > system("convert tmp/2fsrw1228658263.ps tmp/2fsrw1228658263.png") > > > proc.time() user system elapsed 0.561 0.317 0.665