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(13363,12530,11420,10948,10173,10602,16094,19631,17140,14345,12632,12894,11808,10673,9939,9890,9283,10131,15864,19283,16203,13919,11937,11795,11268,10522,9929,9725,9372,10068,16230,19115,18351,16265,14103,14115,13327,12618,12129,11775,11493,12470,20792,22337,21325,18581,16475,16581,15745,14453,13712,13766,13336,15346,24446,26178,24628,21282,18850,18822,18060,17536,16417,15842,15188,16905,25430,27962,26607,23364,20827,20506,19181,18016,17354,16256,15770,17538,26899,28915,25247,22856,19980,19856,16994,16839,15618,15883,15513,17106,25272,26731,22891,19583,16939,16757,15435,14786,13680,13208,12707,14277,22436,23229,18241,16145,13994,14780,13100,12329,12463,11532,10784,13106,19491,20418,16094,14491,13067) > par5 = '12' > par4 = '0' > 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/175j91229701205.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/2spbb1229701205.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.37645457 -0.19338787 -0.31128493 -0.21398348 -0.08659002 [7] -0.14700614 -0.06850658 -0.18990949 -0.28005615 -0.14197744 0.38736375 [13] 0.89544551 0.31956296 -0.19462298 -0.27822492 -0.21239439 -0.08458030 [19] -0.12615053 -0.06455990 -0.17550944 -0.25121590 -0.10038155 0.37669795 [25] 0.78569268 0.26211666 -0.19385352 -0.24834241 -0.18772614 -0.07847591 [31] -0.11863553 -0.05594771 -0.15446380 -0.22096140 -0.06850492 0.36105399 [37] 0.67978391 0.20416220 -0.20295008 -0.22230632 -0.16693572 -0.06707243 [43] -0.08780005 -0.03670242 -0.13681797 -0.18871454 -0.04502507 0.31888854 [49] 0.55582083 0.15366258 -0.18269301 -0.18508982 -0.13784551 -0.05975433 [55] -0.06195944 -0.02043167 -0.10498813 -0.15524651 -0.04299069 0.26237174 [61] 0.44596851 > (mypacf <- c(rpacf$acf)) [1] 0.376454571 -0.390438030 -0.086709681 -0.132512170 -0.084965927 [6] -0.274811967 -0.007478402 -0.472066183 -0.386446528 -0.577370458 [11] 0.023906889 0.647100304 -0.229787062 0.172441007 0.164017264 [16] -0.003961248 0.195579721 0.128207654 0.012181583 0.134837079 [21] 0.101929698 0.016244938 0.034410084 -0.037149580 -0.045335045 [26] -0.062358148 -0.067844284 0.012491429 -0.120387583 -0.118874641 [31] 0.038651613 -0.094857582 -0.013572678 0.006744265 -0.023347945 [36] -0.047345254 0.022577858 -0.130234140 -0.008000067 -0.125697165 [41] -0.044487815 0.027659840 -0.057604193 -0.030915437 0.123915649 [46] -0.095287797 -0.025571945 -0.108900448 -0.028414563 0.013168474 [51] -0.021386478 -0.017162639 -0.016640069 -0.057929307 0.053698723 [56] 0.095020344 -0.011178415 0.027986048 0.043014309 -0.032239094 > 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/38ipx1229701205.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/486zg1229701205.tab") > > system("convert tmp/175j91229701205.ps tmp/175j91229701205.png") > system("convert tmp/2spbb1229701205.ps tmp/2spbb1229701205.png") > > > proc.time() user system elapsed 0.605 0.325 0.740