R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(467,460,448,443,436,431,484,510,513,503,471,471,476,475,470,461,455,456,517,525,523,519,509,512,519,517,510,509,501,507,569,580,578,565,547,555,562,561,555,544,537,543,594,611,613,611,594,595,591,589,584,573,567,569,621,629,628,612,595,597,593,590,580,574,573,573,620,626,620,588,566,557,561,549,532,526,511,499,555,565,542,527,510,514) > par7 = '' > par6 = 'White Noise' > 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/11kk51261343165.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/2yzk71261343165.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.069470631 -0.045641709 -0.062572342 0.068938780 [6] 0.044564105 -0.003041291 0.007938979 0.053464097 0.187364664 [11] -0.124996069 -0.013621642 -0.234230388 -0.004101877 0.166658101 [16] 0.036718945 -0.018480259 -0.102032855 0.114354642 0.059431143 [21] 0.032074767 0.003411343 0.067449559 0.203879127 -0.111868356 [26] -0.144735434 -0.257900818 0.083585388 -0.001982240 0.114273191 [31] -0.098687286 -0.074520816 0.059798414 -0.100087098 -0.046437184 [36] -0.095659370 0.035705389 0.084841906 0.158550229 -0.134977453 [41] -0.050683410 0.014808215 -0.040585003 0.038211953 -0.139672688 [46] -0.078520868 0.011556178 -0.082452796 -0.092249130 -0.094295082 [51] 0.062543482 -0.021461816 -0.014743064 -0.122591762 0.026853817 [56] -0.082315543 0.017635836 0.056138980 -0.049085412 -0.001657587 [61] 0.040667988 > (mypacf <- c(rpacf$acf)) [1] 0.069470631 -0.050712625 -0.056132315 0.075897911 0.029133802 [6] -0.005939350 0.020870880 0.051389562 0.178674102 -0.151874280 [11] 0.028941218 -0.249419062 -0.003897865 0.168897584 -0.012103440 [16] 0.027944206 -0.106328016 0.110622919 0.093975925 0.016107534 [21] 0.137101854 -0.058652485 0.184635077 -0.212504451 -0.131577277 [26] -0.189940336 -0.006351517 -0.011276560 0.086098965 -0.051771992 [31] 0.004671115 0.044404092 0.010522585 -0.015508260 0.047200797 [36] -0.151567081 0.032182228 0.019631562 -0.060869441 0.030045743 [41] -0.055149587 -0.063693794 0.009717316 -0.081387227 -0.031480270 [46] -0.036160335 -0.043613139 -0.006134744 -0.039918156 0.063746651 [51] -0.110619350 -0.100024224 0.039102603 0.016448928 -0.063320859 [56] -0.011498898 0.012386062 -0.045086072 -0.071545827 0.098828038 > 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/3hcc41261343165.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/4oaln1261343165.tab") > try(system("convert tmp/11kk51261343165.ps tmp/11kk51261343165.png",intern=TRUE)) character(0) > try(system("convert tmp/2yzk71261343165.ps tmp/2yzk71261343165.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.589 0.311 1.050