R version 2.6.0 (2007-10-03) Copyright (C) 2007 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.0157849668494866,-0.0271243010459872,-0.00792489154600524,0.0459148837142854,-0.107916181571559,-0.0438458600342877,-0.0271360801903513,0.00521599837540238,0.00344739379213696,0.0462884673027588,-0.00976918475560182,0.0050866877592345,-0.0268378742497628,-0.0460202969387869,0.00457411682055295,0.0202703370108024,0.0138780874221882,-0.0368570893621345,-0.0373042102182677,-0.0141720137855576,0.0279211612252405,-0.0237502531453190,-0.087199473568876,-0.0268651976802244,0.0225803058445590,-0.0294893683948694,0.0123811767063646,-0.0285515432644254,-0.0382291635675997,0.00431996960950776,0.06468414985189,-0.0335672378538977,0.0472156054558626,0.0146421371606427,-0.0178345540240388,-0.00226478772904236,-0.0249815068169007,0.00796397473835646,0.0239811700103298,-0.00474979278015027,-0.0102587630332712,-0.0409266443312390,-0.0134088339827680,-0.0362048327139919,0.0235300662773532,-0.0139176221956711,-0.0042540794454387,-0.0107326457092543) > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '1' > par1 = 'Default' > #'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/1updt1196799590.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/2l0d31196799590.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.021503780 -0.150292942 -0.119994770 -0.034290237 [6] 0.004728409 0.210807898 -0.123615881 -0.067175057 0.091030846 [11] -0.143717475 -0.181581814 0.032869303 -0.053665036 0.067431296 [16] -0.044364096 -0.100606891 > (mypacf <- c(rpacf$acf)) [1] -0.021503780 -0.150825098 -0.129972775 -0.068268638 -0.040069928 [6] 0.185535022 -0.132055752 -0.021549286 0.104145271 -0.184977179 [11] -0.196540082 -0.053043145 -0.117280266 0.001432823 -0.160820682 [16] -0.062794413 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > 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 1:par1) { + 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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/3aus01196799590.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-1,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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/41dh61196799590.tab") > > system("convert tmp/1updt1196799590.ps tmp/1updt1196799590.png") > system("convert tmp/2l0d31196799590.ps tmp/2l0d31196799590.png") > > > proc.time() user system elapsed 0.763 0.310 0.886