R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(233084,233898,231355,232662,230037,231814,246796,247891,248291,245766,238776,242541,246861,246843,246947,241679,240085,241514,250525,250567,252145,251877,245817,248269,246310,246733,245028,240022,238614,238096,248530,248381,247567,241783,235000,237384,238020,236412,232279,230408,230254,229217,239658,239906,236558,223566,216054,214685,216086,211692,204681,203075,198401,191246,206750,209611,199573,195635,190062,193134,194795,190835,185045,184425,177293,180549,195344,196597,189102,185749,185145,192243,197356) > par5 = '12' > par4 = '0' > par3 = '1' > 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/1ob3h1244103145.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/2my291244103145.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.169158957 -0.251056585 -0.251874290 -0.222127360 [6] 0.217830138 0.333260114 0.131706363 -0.194949493 -0.284041488 [11] -0.209521307 0.217492811 0.631117793 0.039055115 -0.207332119 [16] -0.220830880 -0.165960060 0.171727607 0.201549344 0.100752150 [21] -0.253554059 -0.286862098 -0.093114172 0.147696626 0.413814899 [26] 0.033723321 -0.224541429 -0.251892600 -0.125413374 0.124026522 [31] 0.159392377 0.066389646 -0.228322423 -0.187776437 -0.020796451 [36] 0.080009822 0.299196400 0.048477111 -0.203772084 -0.226279263 [41] -0.072892330 0.074818790 0.111558416 0.034264373 -0.214019601 [46] -0.105944170 -0.008822329 0.010156101 0.221476818 > (mypacf <- c(rpacf$acf)) [1] 0.169158957 -0.287909806 -0.166665193 -0.247440071 0.218818533 [6] 0.141431054 0.118217451 -0.136597768 -0.054170687 -0.209254618 [11] 0.182357675 0.472145773 -0.129191351 0.066350940 0.007818279 [16] 0.020582003 -0.143776836 -0.104535252 0.057190645 -0.221836125 [21] 0.001901662 0.020997422 -0.097186117 0.027637733 0.083278028 [26] -0.082227197 -0.163685105 0.020364881 -0.051959536 -0.099787957 [31] -0.019243398 0.111877485 0.031391432 0.022286061 0.004223717 [36] -0.005919624 0.000921270 -0.041497374 -0.071881512 -0.031067257 [41] -0.091575794 -0.001757146 -0.073072260 -0.083533584 0.029706734 [46] -0.050159556 -0.148670487 -0.063043830 > 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/3jx3m1244103145.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/4an5e1244103145.tab") > > system("convert tmp/1ob3h1244103145.ps tmp/1ob3h1244103145.png") > system("convert tmp/2my291244103145.ps tmp/2my291244103145.png") > > > proc.time() user system elapsed 0.554 0.310 0.715