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(14897,13063,12604,13630,14421,13978,12928,13430,13470,14786,14292,14309,14013,13241,12153,14290,15669,14170,14570,14469,14265,15321,14434,13692,14194,13519,11858,14616,15643,14077,14888,14160,14643,17193,15386,14287,17527,14497,14398,16630,16671,16615,16869,15664,16360,18448,16889,16505,18321,15052,15700,18135,16769,18883,19021,18102,17776,21490,17065,18690,18953,16399,16896,18553,19270,19422,17579,18637,18077,20439,18075,19563,19899,19228,17790,19221,22059,21231,19504,23913,23166,23574,25002,22604,23409) > par5 = '12' > par4 = '1' > par3 = '1' > 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/13pvv1228762796.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/2746o1228762796.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.550622598 -0.031986636 0.370535613 -0.248245912 [6] -0.132678232 0.309880991 -0.257674905 0.005278989 0.265132399 [11] -0.264128998 0.053677237 0.118304993 -0.254901525 0.099283987 [16] 0.088335468 -0.211654367 0.127842893 0.128249612 -0.194803459 [21] 0.116280692 0.045537087 -0.227108705 0.349107834 -0.303857332 [26] 0.090593171 0.134509499 -0.121884328 -0.048299883 0.209541812 [31] -0.246410870 0.044820863 0.127516979 -0.179462867 -0.001048672 [36] 0.174545811 -0.189489663 0.092672250 0.054279735 -0.103255011 [41] 0.062479394 0.083735146 -0.189351298 0.133947543 0.080064422 [46] -0.241860556 0.286930846 -0.143046464 -0.047912072 0.130663308 [51] -0.107860584 -0.040401495 0.099966449 -0.089428359 -0.002575849 [56] 0.096629832 -0.109980310 0.027893651 0.053259446 -0.093154720 [61] 0.039445596 > (mypacf <- c(rpacf$acf)) [1] -0.550622598 -0.481005717 0.148617263 0.186632264 -0.205443592 [6] -0.086488184 -0.111126526 -0.054097137 0.203630844 0.073509957 [11] -0.067692768 -0.172388620 -0.290555679 -0.164466875 0.038814822 [16] 0.023500781 -0.110625028 -0.024132092 0.067964475 0.085248550 [21] 0.040450159 -0.222572373 0.264404406 -0.051717617 -0.053378029 [26] -0.107867587 -0.023844937 -0.015019419 0.029044221 -0.044517804 [31] -0.093608759 -0.136134983 0.009741338 -0.098254266 -0.012686409 [36] -0.068869797 0.008970370 -0.000679319 0.104291387 0.060196633 [41] -0.004206231 -0.090988483 -0.049571683 0.091798851 -0.067120223 [46] 0.001003943 -0.016174976 -0.067355654 0.021734827 -0.119011202 [51] 0.047441762 -0.038318255 0.033912313 -0.056104771 -0.066988675 [56] -0.030211168 0.038982187 -0.121633297 -0.014729548 -0.039122733 > 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/377ei1228762796.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/4xf2f1228762796.tab") > > system("convert tmp/13pvv1228762796.ps tmp/13pvv1228762796.png") > system("convert tmp/2746o1228762796.ps tmp/2746o1228762796.png") > > > proc.time() user system elapsed 0.610 0.303 0.731