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(30.06,30.46,30.46,30.49,30.49,30.5,30.5,30.5,30.51,30.51,30.61,30.88,30.95,31.09,31.28,31.31,31.32,31.34,31.34,31.34,31.34,31.36,31.36,31.36,31.72,32.07,32.13,32.19,32.26,32.27,32.28,32.28,32.28,32.29,32.61,32.68,32.69,32.74,32.86,32.86,32.9,32.95,32.95,32.96,32.99,33,33.06,33.42,33.48,33.5,33.51,33.52,33.55,33.56,33.56,33.56,33.6,33.61,33.62,33.72,33.83,33.96,34.06,34.11,34.11,34.21,34.19,34.17,34.12,34.15,34.15,34.15) > 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/1bbr71242319015.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/2opva1242319015.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.22695453 -0.03757548 -0.01619769 -0.10237526 -0.25713232 [7] -0.20669273 -0.21647044 -0.24188051 0.04418463 0.26500507 0.03587466 [13] 0.11139447 0.42779401 0.19311541 -0.04293028 -0.09904855 -0.14671014 [19] -0.14494840 -0.16305259 -0.09624145 -0.08593903 0.08113839 0.35582996 [25] 0.16822691 -0.01713124 -0.01833259 0.03253120 -0.07431030 -0.12748858 [31] -0.14454907 -0.08019493 -0.11078148 0.14456286 0.04202424 0.07407209 [37] 0.16432755 0.12450943 -0.01813696 -0.06024617 -0.05400514 -0.08283820 [43] -0.13553348 -0.14726209 -0.11529194 -0.03624834 0.14445173 0.02961765 [49] 0.07252247 > (mypacf <- c(rpacf$acf)) [1] 0.2269545259 -0.0939215785 0.0153672327 -0.1122357061 -0.2220205837 [6] -0.1246819077 -0.2078468818 -0.2392612681 0.0415618116 0.1407688749 [11] -0.1610516742 0.0377336862 0.3440745024 0.0590626929 -0.0051816627 [16] -0.0204566381 0.0407517250 0.1281399303 -0.1164772514 0.0160769975 [21] 0.1231366550 0.0360601231 0.1775794742 0.0489098913 -0.0755416382 [26] -0.1537117189 -0.0193570731 -0.0276757692 0.0171565095 -0.0763840620 [31] 0.0009947264 -0.1315557102 0.0823148202 -0.0770598521 0.0478033288 [36] -0.0838292037 -0.0654124732 0.0337090485 0.0802019736 0.0109193935 [41] 0.0182672538 -0.0096289519 -0.1268750600 -0.0722808348 -0.0538329440 [46] -0.0270497103 -0.1787645449 0.0218237057 > 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/3lpux1242319015.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/47tch1242319016.tab") > system("convert tmp/1bbr71242319015.ps tmp/1bbr71242319015.png") > system("convert tmp/2opva1242319015.ps tmp/2opva1242319015.png") > > > proc.time() user system elapsed 0.578 0.323 0.822