R version 2.8.0 (2008-10-20) 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(97.5,97.1,97.5,98.5,100.5,102.8,105.2,107.4,108.0,107.6,107.0,105.8,104.3,103.8,104.4,106.2,108.5,109.8,110.3,109.7,108.7,108.9,109.7,110.4,111.4,112.6,113.6,113.8,113.2,113.6,113.9,113.4,113.8,116.0,118.3,120.5,121.9,121.2,120.2,120.6,110.2,109.2,108.7,109.9,112.2,114.5,114.7,113.2,112.1,112.6,113.6,114.0,114.5,115.0,114.9,114.8,114.3,113.7,114.5,116.0,116.6,116.2,115.7,115.6,115.2,115.0,115.7,115.9,115.6,115.9,117.0,117.9,118.8,119.9) > par5 = '12' > par4 = '0' > par3 = '2' > 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/152au1230124542.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/221t41230124542.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.0000000000 -0.3619799827 0.0469615540 -0.0114666293 -0.1365062742 [6] -0.1450631341 -0.0039394530 -0.0038778208 0.0753349516 0.0735796861 [11] 0.0082719718 0.0113958639 0.0195336792 -0.0722302730 -0.0072863982 [16] -0.0396902425 0.0018417941 0.0795088233 -0.0437545159 -0.0468671776 [21] 0.0979471276 0.0437502537 -0.0258878146 -0.0320318864 -0.0639307663 [26] -0.0239152466 -0.0474862731 0.0261540304 0.1241852510 0.0586307373 [31] -0.0374034925 0.0184916150 -0.0076659333 -0.0817155394 -0.0140958404 [36] -0.0189198606 -0.0197398865 0.0461928093 0.0002182496 0.0256352647 [41] -0.0055491961 -0.0085205977 -0.0064796999 0.0016873415 0.0079514303 [46] 0.0120300462 -0.0037619307 -0.0099530892 0.0025897692 > (mypacf <- c(rpacf$acf)) [1] -0.361979983 -0.096744314 -0.032343415 -0.171705398 -0.310720432 [6] -0.255235636 -0.199369137 -0.111225800 -0.065993381 -0.112102269 [11] -0.122416546 -0.049561183 -0.068368722 -0.052584488 -0.091703728 [16] -0.089424326 0.027103369 -0.033426202 -0.165724576 -0.063523469 [21] 0.098616431 0.115971701 0.007479482 -0.113363189 -0.088799102 [26] -0.087362512 -0.070213144 0.032507096 0.065845708 -0.027141933 [31] -0.019948157 0.077545541 0.083052967 0.086086014 0.087401872 [36] 0.046589279 0.014517634 -0.034433648 0.006535347 -0.000348880 [41] -0.051268267 -0.095912953 -0.097144728 -0.067670205 -0.052333925 [46] -0.029653109 -0.004425057 -0.047058458 > 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/3o0081230124542.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/4rkax1230124542.tab") > > system("convert tmp/152au1230124542.ps tmp/152au1230124542.png") > system("convert tmp/221t41230124542.ps tmp/221t41230124542.png") > > > proc.time() user system elapsed 0.583 0.330 0.709