R version 2.8.1 (2008-12-22) 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(1.54,1.55,1.53,1.55,1.55,1.53,1.54,1.54,1.54,1.53,1.53,1.53,1.54,1.53,1.53,1.54,1.55,1.53,1.53,1.53,1.53,1.52,1.54,1.53,1.52,1.54,1.53,1.54,1.54,1.53,1.54,1.54,1.52,1.52,1.57,1.6,1.59,1.6,1.6,1.62,1.61,1.61,1.62,1.61,1.62,1.61,1.62,1.61,1.61,1.58,1.57,1.57,1.66,1.66,1.67,1.68,1.66,1.66,1.64,1.61,1.58,1.57,1.54,1.61,1.65,1.6,1.57,1.56,1.55,1.54,1.51,1.5,1.5,1.49,1.47,1.47,1.49,1.49,1.49,1.51,1.49,1.48,1.46,1.46,1.45,1.45,1.44,1.47,1.47,1.45,1.43,1.44,1.38,1.4,1.37,1.41) > par5 = '12' > par4 = '0' > par3 = '1' > 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/174vi1241782955.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/2mjgc1241782955.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.037870143 -0.029448021 -0.099679215 0.000964645 [6] -0.104457378 -0.030660129 -0.126577000 0.082469124 0.095583357 [11] -0.012136349 0.130276969 0.219843579 -0.085476862 -0.146928488 [16] 0.025354709 -0.004243776 0.004903930 0.018647002 0.053069221 [21] -0.032616915 -0.016261740 0.004374381 -0.020314318 0.193641592 [26] -0.047972565 -0.081223157 0.077273942 -0.110864667 -0.043646047 [31] 0.058037817 -0.128843113 0.054299659 0.047460328 -0.012951294 [36] -0.059576819 0.028949787 -0.094539280 -0.027320660 -0.005015696 [41] -0.169548636 0.126495021 -0.005144773 0.068652476 -0.026442067 [46] 0.051950548 -0.106632602 -0.059464290 -0.006660607 > (mypacf <- c(rpacf$acf)) [1] -0.037870143 -0.030926522 -0.102244382 -0.008248167 -0.112711011 [6] -0.051801782 -0.143882315 0.044146083 0.081619647 -0.039876052 [11] 0.145776452 0.238627519 -0.049071138 -0.110250866 0.090383372 [16] 0.030362723 0.004251234 0.068661692 0.094178204 -0.117143400 [21] -0.087309183 0.068119254 -0.089100456 0.158485174 0.068769970 [26] -0.067190580 0.032096417 -0.165220197 -0.028676286 0.044132595 [31] -0.150297667 0.122609121 0.004967549 -0.091211949 -0.127395528 [36] -0.101533131 -0.028491256 -0.038576009 0.025603368 -0.134990434 [41] 0.053190787 -0.094620635 0.058861652 -0.002038514 0.040019450 [46] -0.007907606 -0.030816665 0.033165401 > 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/3ssal1241782955.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/4fdbr1241782955.tab") > > system("convert tmp/174vi1241782955.ps tmp/174vi1241782955.png") > system("convert tmp/2mjgc1241782955.ps tmp/2mjgc1241782955.png") > > > proc.time() user system elapsed 0.583 0.311 0.734