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 = '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/1geog1229963140.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/28nho1229963140.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.70504863 0.61656896 0.65770456 0.66584286 0.59723343 [7] 0.62269222 0.55740295 0.58095339 0.48693654 0.40431137 0.48897556 [13] 0.63734220 0.41987960 0.33621032 0.36874198 0.36618426 0.34436809 [19] 0.34993008 0.29903011 0.31407618 0.22798330 0.14890729 0.25513824 [25] 0.32864670 0.18172430 0.10871452 0.11151895 0.10923544 0.08940564 [31] 0.07604679 0.03667251 0.03751334 -0.03727349 -0.10524529 -0.02316797 [37] 0.04156329 -0.07597002 -0.13848736 -0.15039271 -0.12744518 -0.15983808 [43] -0.16465454 -0.18303586 -0.16783432 -0.25143383 -0.28367929 -0.23265401 [49] -0.17365423 -0.25973356 -0.30935145 -0.31277209 -0.28184014 -0.31547245 [55] -0.29995924 -0.31100614 -0.27976427 -0.32740510 -0.35396859 -0.29873304 [61] -0.23788194 > (mypacf <- c(rpacf$acf)) [1] 0.705048627 0.237569821 0.334587634 0.220904072 0.030490557 [6] 0.172307038 -0.094638985 0.138946722 -0.206798970 -0.185432370 [11] 0.203255158 0.421322054 -0.307355137 -0.268898657 -0.070645373 [16] 0.050420851 0.188551588 -0.008898272 -0.129847639 -0.070140378 [21] 0.061478117 0.036092258 0.038580588 -0.099804873 -0.031618904 [26] -0.019649511 -0.061920658 -0.019940722 -0.129730360 -0.018235484 [31] -0.007882914 0.017105917 0.043712841 -0.053213238 -0.081161367 [36] 0.076646549 -0.002009851 -0.039076632 -0.104896905 0.013731891 [41] -0.063393711 0.026973919 0.002452342 0.022807884 -0.061806105 [46] 0.011760216 -0.049546485 -0.053264100 0.019154135 -0.006837358 [51] 0.013074745 -0.025175511 -0.046386815 0.048440325 -0.021418439 [56] 0.054909697 0.084751285 -0.053970500 -0.004920647 -0.025171349 > 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/3ikbb1229963140.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/4kvvu1229963140.tab") > > system("convert tmp/1geog1229963140.ps tmp/1geog1229963140.png") > system("convert tmp/28nho1229963140.ps tmp/28nho1229963140.png") > > > proc.time() user system elapsed 0.603 0.325 0.711