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(17704,15548,28029,29383,36438,32034,22679,24319,18004,17537,20366,22782,19169,13807,29743,25591,29096,26482,22405,27044,17970,18730,19684,19785,18479,10698,31956,29506,34506,27165,26736,23691,18157,17328,18205,20995,17382,9367,31124,26551,30651,25859,25100,25778,20418,18688,20424,24776,19814,12738,31566,30111,30019,31934,25826,26835,20205,17789,20520,22518,15572) > par5 = '12' > par4 = '1' > par3 = '0' > par2 = '-1.3' > 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/148px1229081837.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/2esrp1229081837.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.194019283 0.232071718 0.124337030 0.088123428 [6] 0.025421668 0.040721924 -0.104865609 0.018861857 -0.014135319 [11] -0.150633433 -0.258039951 -0.106982795 -0.166168214 -0.005041178 [16] -0.065545243 -0.067718672 0.016773260 -0.019631228 0.053892762 [21] 0.048122668 0.067588103 0.011303331 0.074267211 -0.209597890 [26] -0.035055277 -0.048289632 0.009318869 -0.032359929 -0.018167631 [31] -0.056301273 -0.067283212 -0.085656596 -0.111475745 -0.029641189 [36] 0.122184123 -0.091187079 0.070538762 -0.028137213 -0.009784789 [41] -0.021774253 -0.005960516 0.008504277 0.034834661 0.040066086 [46] 0.013062675 0.001715045 0.035474880 -0.021769754 > (mypacf <- c(rpacf$acf)) [1] 0.1940192829 0.2020334800 0.0533099277 0.0161861827 -0.0281148627 [6] 0.0151205785 -0.1289649551 0.0451250088 0.0220291652 -0.1613666127 [11] -0.2357546783 0.0155503993 -0.0316703282 0.0855683206 0.0003914633 [16] -0.0529254951 0.0244118355 -0.0501380346 0.1108257201 0.0317419998 [21] -0.0028821597 -0.1092237002 -0.0006578149 -0.2836626476 0.0284634770 [26] 0.0443146917 0.0718997028 -0.0356999651 -0.0604531582 0.0245981228 [31] -0.1068430212 0.0167048185 -0.0548893778 0.0117492591 0.0343196419 [36] -0.1625914017 0.0305675026 0.0051445303 -0.0232027411 -0.0664349157 [41] 0.0008644207 -0.0240820319 0.0001319312 0.0145540710 0.0665542070 [46] -0.0497003786 -0.0065754373 -0.0858894504 > 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/339041229081837.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/489lm1229081837.tab") > > system("convert tmp/148px1229081837.ps tmp/148px1229081837.png") > system("convert tmp/2esrp1229081837.ps tmp/2esrp1229081837.png") > > > proc.time() user system elapsed 0.592 0.340 0.697