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(11.514,31.514,27.071,29.462,26.105,22.397,23.843,21.705,18.089,20.764,25.316,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) > par5 = '12' > par4 = '0' > par3 = '0' > 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/1phql1229858837.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/2nep11229858837.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.775796245 0.675320842 0.518626613 0.394049008 [6] 0.267387308 0.107260387 0.108837151 0.046331815 0.018878320 [11] 0.008906858 -0.015405158 0.106434406 -0.023561431 -0.008710076 [16] -0.058695110 -0.046072100 -0.062040034 -0.131285338 -0.078495392 [21] -0.117245130 -0.094356268 -0.061154911 -0.019885041 0.068964868 [26] -0.020563132 0.008029496 -0.048017701 -0.060661663 -0.107401598 [31] -0.149440617 -0.125367249 -0.155517666 -0.138626924 -0.115387162 [36] -0.093044521 -0.051462169 -0.105812585 -0.055745193 -0.076160189 [41] -0.061613190 -0.081468120 -0.085827689 -0.084479330 -0.119464846 [46] -0.137897785 -0.144136656 -0.141103353 -0.149551804 -0.181412306 [51] -0.129516508 -0.106976303 -0.072646840 -0.052092090 -0.033718092 [56] -0.013378137 -0.008444028 -0.008482152 -0.003542691 0.013911183 [61] 0.017131778 > (mypacf <- c(rpacf$acf)) [1] 0.775796245 0.184510460 -0.134586731 -0.065235521 -0.065626465 [6] -0.191971706 0.262638631 -0.018928010 -0.080726040 0.061527800 [11] -0.073579683 0.315824423 -0.441361625 0.076988815 0.002531941 [16] 0.051904112 0.002225172 -0.077549016 -0.008540315 -0.039481138 [21] 0.075786104 0.138073020 0.075993086 -0.223005260 -0.074872836 [26] -0.014983757 0.030569942 -0.050939820 -0.067273738 0.092616495 [31] -0.137098231 0.151292361 -0.062616529 0.033943419 -0.161198837 [36] -0.003278582 0.082134620 0.033620071 -0.057530912 -0.095796582 [41] 0.062169909 -0.064344019 0.041153275 -0.076013176 -0.088258782 [46] -0.116065969 0.078514399 -0.032053849 0.027558637 0.016105628 [51] 0.006551019 0.072291050 -0.020264662 -0.099057503 0.013883169 [56] 0.014677770 -0.043968079 0.016954218 0.033895587 0.011001986 > 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/3lwek1229858837.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/4qv5u1229858837.tab") > > system("convert tmp/1phql1229858837.ps tmp/1phql1229858837.png") > system("convert tmp/2nep11229858837.ps tmp/2nep11229858837.png") > > > proc.time() user system elapsed 0.578 0.323 0.693