R version 2.7.0 (2008-04-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(555,562,561,555,544,537,543,594,611,613,611,594,595,591,589,584,573,567,569,621,629,628,612,595,597,593,590,580,574,573,573,620,626,620,588,566,557,561,549,532,526,511,499,555,565,542,527,510,514,517,508,493,490,469,478,528,534,518,506,502) > par5 = '12' > par4 = '0' > 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/1uy961230129107.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/24frl1230129107.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.885194451 0.721446833 0.603345541 0.553237317 [6] 0.548636217 0.508795574 0.431456793 0.359272388 0.334338067 [11] 0.366052873 0.430987821 0.439389317 0.300833248 0.142761522 [16] 0.029696972 -0.015499988 -0.029292307 -0.082127705 -0.151945684 [21] -0.215521163 -0.232820967 -0.203239278 -0.155498655 -0.148865606 [26] -0.234601570 -0.330452189 -0.374880600 -0.368927874 -0.339514795 [31] -0.340277070 -0.357880765 -0.373031769 -0.352139390 -0.303861567 [36] -0.244492718 -0.206211916 -0.235486970 -0.266875534 -0.261379624 [41] -0.227214088 -0.184447468 -0.176430246 -0.181897924 -0.177937152 [46] -0.149749437 -0.111819579 -0.068549089 -0.040475089 -0.042817595 [51] -0.039739085 -0.022101276 0.007537271 0.034009474 0.028084980 [56] 0.013320210 0.003503956 0.001047736 0.001963721 0.003091449 > (mypacf <- c(rpacf$acf)) [1] 0.885194451 -0.287031177 0.178747241 0.159555877 0.114249653 [6] -0.180809576 -0.025096232 0.047729576 0.121208132 0.127773372 [11] 0.182185313 -0.176187862 -0.580726092 0.069953714 -0.077429880 [16] -0.043710030 -0.041440716 0.067468308 0.039656843 -0.183047190 [21] 0.042362507 -0.037161905 -0.034699510 0.038705731 0.014875050 [26] -0.041822934 0.068116577 -0.081248056 0.069718311 0.006666679 [31] -0.013203333 -0.040431643 -0.009712272 -0.035897137 -0.015980243 [36] 0.104837598 -0.039327336 0.021929607 -0.027578729 -0.029401597 [41] -0.135298310 -0.042733378 0.051593561 0.012313554 -0.001266633 [46] -0.044713735 0.026373889 -0.084040209 0.136226496 -0.019530344 [51] -0.008948329 -0.016053135 0.017928608 -0.071917290 -0.057656103 [56] 0.011679914 -0.084216646 -0.003972051 -0.055390295 > 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/3stro1230129107.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/4a98g1230129107.tab") > > system("convert tmp/1uy961230129107.ps tmp/1uy961230129107.png") > system("convert tmp/24frl1230129107.ps tmp/24frl1230129107.png") > > > proc.time() user system elapsed 1.556 0.556 1.644