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(15916.4,16535.9,15796,14418.6,15044.5,14944.2,16754.8,14254,15454.9,15644.8,14568.3,12520.2,14803,15873.2,14755.3,12875.1,14291.1,14205.3,15859.4,15258.9,15498.6,15106.5,15023.6,12083,15761.3,16943,15070.3,13659.6,14768.9,14725.1,15998.1,15370.6,14956.9,15469.7,15101.8,11703.7,16283.6,16726.5,14968.9,14861,14583.3,15305.8,17903.9,16379.4,15420.3,17870.5,15912.8,13866.5,17823.2,17872,17420.4,16704.4,15991.2,16583.6,19123.5,17838.7,17209.4,18586.5,16258.1,15141.6,19202.1,17746.5,19090.1,18040.3,17515.5,17751.8,21072.4,17170,19439.5,19795.4,17574.9,16165.4,19464.6,19932.1,19961.2,17343.4,18924.2,18574.1,21350.6,18594.6,19823.1,20844.4,19640.2,17735.4,19813.6,22238.5,20682.2,17818.6,21872.1,22117,21865.9,23451.3,20953.7,22497.3) > par5 = '12' > par4 = '1' > par3 = '0' > par2 = '1' > par1 = '60' > #'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/1iuqn1229964310.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/2p3hr1229964310.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.2977053304 0.4266078793 0.5272635257 0.2425514077 [6] 0.2248988362 0.3504577171 0.0498756114 0.1954191207 0.2122694111 [11] 0.0301675904 0.0460875839 0.0904208023 -0.0202020302 0.0971308968 [16] 0.1027600503 -0.0202667206 0.1755853360 0.1315462520 0.0695335670 [21] 0.1749947498 0.0957326346 -0.0090759352 0.2576789617 -0.1020412316 [26] 0.0276168538 0.0830997213 -0.0627514818 -0.0870868469 0.0010891255 [31] -0.2060708501 -0.0712023013 -0.0694243813 -0.1856761417 -0.0788200116 [36] -0.0392600823 -0.1107688504 0.0008461105 -0.0071470027 -0.0485889894 [41] 0.0717470733 0.0493526853 -0.0420446508 0.0660857717 0.0622124147 [46] -0.0868818003 0.1012289795 -0.0764675542 -0.1260173678 0.0070506153 [51] -0.1354085763 -0.1708047779 -0.0631276160 -0.1669771656 -0.1151668240 [56] -0.0756390118 -0.1814733992 -0.0805247810 -0.0815778547 -0.1180425005 [61] -0.0329839524 > (mypacf <- c(rpacf$acf)) [1] 0.297705330 0.370847017 0.428679014 -0.037341321 -0.182594003 [6] 0.098679473 -0.124514579 0.062501128 0.102847396 -0.031305062 [11] -0.168476832 -0.064838514 0.075739422 0.182489702 0.134368936 [16] -0.118440355 0.045105990 0.055071407 0.060856056 0.040661511 [21] -0.071887667 -0.221566172 0.163639149 -0.172144379 0.028591638 [26] 0.002684488 -0.000368856 -0.122081909 -0.101047279 0.005174581 [31] 0.081927814 0.041326384 -0.075562028 0.013146586 -0.017669986 [36] 0.073267887 0.067411202 0.029187283 0.013551628 -0.062839580 [41] 0.018827402 -0.042596477 0.025703203 0.086610068 -0.119275683 [46] -0.057741750 0.007356686 -0.115001596 0.047427094 -0.012504839 [51] 0.024277432 -0.102072884 -0.021233074 0.035480048 0.042470256 [56] -0.066622133 -0.017649337 -0.076148315 -0.031306387 0.115513192 > 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/3jk401229964310.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/4r7az1229964310.tab") > > system("convert tmp/1iuqn1229964310.ps tmp/1iuqn1229964310.png") > system("convert tmp/2p3hr1229964310.ps tmp/2p3hr1229964310.png") > > > proc.time() user system elapsed 0.593 0.326 0.942