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(565464,547344,554788,562325,560854,555332,543599,536662,542722,593530,610763,612613,611324,594167,595454,590865,589379,584428,573100,567456,569028,620735,628884,628232,612117,595404,597141,593408,590072,579799,574205,572775,572942,619567,625809,619916,587625,565742,557274,560576,548854,531673,525919,511038,498662,555362,564591,541657,527070,509846,514258,516922,507561,492622,490243,469357,477580,528379,533590,517945) > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1.2' > 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/1pbal1228469584.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/2zyn71228469584.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.240449794 -0.199346379 -0.269533343 -0.238476497 [6] 0.026027678 0.155009772 0.053066742 -0.273860638 -0.254561270 [11] -0.144004175 0.252711174 0.734397871 0.123025374 -0.180076018 [16] -0.250815041 -0.187987295 0.026340003 0.114336802 0.030906728 [21] -0.268702632 -0.195984753 -0.071856058 0.185583511 0.486132872 [26] 0.095021328 -0.163735952 -0.215349396 -0.122435008 0.020389544 [31] 0.078495292 0.013209472 -0.206634100 -0.119906266 -0.060711050 [36] 0.120816650 0.334777975 0.061494000 -0.141867422 -0.111535455 [41] -0.041697427 0.017975161 0.059072385 0.012936118 -0.133971269 [46] -0.055960966 -0.009433096 0.079853108 0.163604261 0.021270459 [51] -0.063008377 -0.034474915 -0.007719906 0.001822798 0.044350240 [56] 0.016033345 -0.046950420 -0.011078798 0.012563468 > (mypacf <- c(rpacf$acf)) [1] 0.240449794 -0.272942982 -0.163864286 -0.203921929 0.043137156 [6] 0.007828234 -0.062703501 -0.332711646 -0.132581041 -0.237666112 [11] 0.179762068 0.596374129 -0.208399746 0.116998963 -0.046664501 [16] 0.008972401 -0.025698080 -0.122622307 -0.013553740 -0.027901056 [21] 0.013915476 0.007917432 -0.196461185 -0.056257665 0.075887662 [26] -0.147118579 0.037003370 -0.077682058 -0.033275427 0.010128603 [31] -0.094599079 0.048382796 -0.026261905 -0.136240301 0.043756199 [36] -0.098552515 -0.065002477 -0.010060207 0.024809494 0.037177674 [41] -0.021351957 -0.023923738 0.028085921 -0.031476625 0.055785765 [46] 0.064847866 -0.082461417 -0.082579858 0.026067040 0.040797793 [51] -0.051012121 -0.036356885 -0.035484354 0.054691874 -0.003079728 [56] 0.065674057 -0.062089128 0.004222765 > 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/3gix71228469584.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/4rbt11228469584.tab") > > system("convert tmp/1pbal1228469584.ps tmp/1pbal1228469584.png") > system("convert tmp/2zyn71228469584.ps tmp/2zyn71228469584.png") > > > proc.time() user system elapsed 0.579 0.327 0.718