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(0.63,0.63,0.63,0.64,0.63,0.63,0.63,0.63,0.63,0.64,0.65,0.65,0.65,0.65,0.65,0.66,0.65,0.66,0.66,0.66,0.66,0.68,0.69,0.7,0.71,0.71,0.7,0.7,0.7,0.7,0.71,0.7,0.7,0.7,0.69,0.7,0.69,0.69,0.69,0.7,0.7,0.71,0.71,0.71,0.72,0.73,0.74,0.74,0.74,0.74,0.75,0.75,0.76,0.76,0.76,0.76,0.76,0.77,0.77,0.78,0.78,0.78,0.78,0.78,0.78,0.78,0.8,0.8,0.8,0.81,0.81,0.81,0.8,0.81,0.81,0.81,0.8,0.82,0.83,0.83) > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '1' > par1 = '48' > #'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/1nod71244369744.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/2en2x1244369744.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.95834779 0.91669558 0.87638500 0.84596144 0.80699249 [7] 0.76768172 0.72734550 0.68800909 0.64391290 0.60086779 0.56229192 [13] 0.52471587 0.48474710 0.44512015 0.41125280 0.37980380 0.34456918 [19] 0.31277837 0.27825302 0.24475312 0.20783507 0.17948804 0.15185029 [25] 0.13036523 0.11061488 0.08915546 0.06527768 0.03866538 0.01510378 [31] -0.01085052 -0.03031033 -0.05389756 -0.07885205 -0.10414837 -0.13017958 [37] -0.14971629 -0.17203880 -0.19436132 -0.21873473 -0.23661363 -0.25449253 [43] -0.26485148 -0.27691951 -0.28967117 -0.30373883 -0.31302106 -0.32225201 [49] -0.33250842 > (mypacf <- c(rpacf$acf)) [1] 0.9583477893 -0.0212690570 -0.0052761513 0.0997734118 -0.1225889087 [6] -0.0210521103 -0.0235381880 -0.0356429196 -0.0733028642 -0.0138387610 [11] 0.0292329003 -0.0260017958 -0.0399964529 -0.0103725906 0.0362645772 [16] -0.0021775646 -0.0621445851 0.0327270650 -0.0734993817 -0.0283612333 [21] -0.0484794994 0.0611293102 -0.0192471538 0.0450484310 0.0426593699 [26] -0.0618865091 -0.0389739156 -0.0643321701 0.0035070188 -0.0728254407 [31] 0.0486779307 -0.0577401099 -0.0583653750 -0.0062941764 -0.0587681579 [36] 0.0667850644 -0.0659780592 -0.0254392355 -0.0229061935 0.0156277276 [41] -0.0207834257 0.0519553507 -0.0220121759 -0.0614678549 -0.0003362483 [46] 0.0336079657 -0.0458117974 -0.0328192422 > 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/325dl1244369744.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/4949q1244369744.tab") > > system("convert tmp/1nod71244369744.ps tmp/1nod71244369744.png") > system("convert tmp/2en2x1244369744.ps tmp/2en2x1244369744.png") > > > proc.time() user system elapsed 0.563 0.340 0.958