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(474605,470390,461251,454724,455626,516847,525192,522975,518585,509239,512238,519164,517009,509933,509127,500875,506971,569323,579714,577992,565644,547344,554788,562325,560854,555332,543599,536662,542722,593530,610763,612613,611324,594167,595454,590865,589379,584428,573100,567456,569028,620735,628884,628232,612117,595404,597141,593408,590072,579799,574205,572775,572942,619567,625809,619916,587625,565724,557274,560576,548854,531673,525919,511038,498662,555362,564591,541667,527070,509846,514258,516922,507561,492622,490243,469357,477580,528379,533590,517945,506174,501866,516441,528222,532638) > par7 = '0.95' > par6 = 'MA' > par5 = '12' > par4 = '1' > par3 = '1' > 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: > 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 (par6 == 'White Noise') par6 <- 'white' else par6 <- 'ma' > par7 <- as.numeric(par7) > 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/1u79t1259505468.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > racf <- acf(x, par1, main='Autocorrelation', xlab='time lag', ylab='ACF', ci.type=par6, ci=par7, sub=paste('(lambda=',par2,', d=',par3,', D=',par4,', CI=', par7, ', CI type=',par6,')',sep='')) > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/28gf41259505468.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.054440035 0.136876400 0.149512781 0.031690329 [6] 0.045593001 0.091981156 0.015192484 0.203558135 0.027379980 [11] -0.079681559 0.190192539 -0.180005818 -0.013887927 0.194659339 [16] 0.021493219 0.005917229 -0.074963512 0.016319176 0.004457541 [21] -0.062679843 -0.092033886 0.022435511 0.013562341 -0.163876600 [26] -0.090419526 -0.210902472 -0.040694937 -0.136856302 0.063731685 [31] -0.107279113 -0.024658964 -0.018863253 -0.020390866 -0.013349589 [36] -0.003251050 -0.005726228 0.003675442 0.068406391 -0.169054396 [41] -0.054645767 -0.073677943 -0.103842770 0.074455791 -0.033830973 [46] -0.051642500 0.019485762 -0.115514551 -0.052782746 -0.014226198 [51] -0.077791291 0.087437271 0.072084316 -0.064059705 0.087580061 [56] -0.104398364 -0.015894915 0.010695042 -0.013758478 0.002367423 [61] 0.015504697 > (mypacf <- c(rpacf$acf)) [1] 0.0544400350 0.1343107418 0.1386549373 0.0024895094 0.0068104870 [6] 0.0681261444 -0.0006433924 0.1839709782 -0.0074245840 -0.1405539574 [11] 0.1551203544 -0.1992564359 -0.0151007620 0.2135063968 0.0333298410 [16] -0.0718373581 -0.1653110512 0.0997520229 -0.0244974231 -0.0222674002 [21] -0.0471509580 -0.1246890609 0.1418086775 -0.1793182710 -0.1292020156 [26] -0.1358625482 0.0830072267 -0.0480828190 0.0367794522 -0.0316252559 [31] 0.0034137301 0.0930143813 -0.0009820538 -0.0093973701 0.1310599553 [36] -0.0201556415 -0.0874054453 0.0516963845 -0.0842341220 -0.0734416065 [41] -0.0434852978 -0.0997173879 0.0768928294 0.0741654409 -0.1118120925 [46] -0.0815447722 -0.0514034501 0.0374365826 -0.0899602461 -0.0239986543 [51] 0.0658095496 -0.0333898895 0.0687578777 -0.0290573156 -0.0309462803 [56] 0.0539968320 -0.0399225362 0.0054404928 0.0150806188 0.0351673067 > 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/3u8kj1259505468.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/4jyef1259505468.tab") > > system("convert tmp/1u79t1259505468.ps tmp/1u79t1259505468.png") > system("convert tmp/28gf41259505468.ps tmp/28gf41259505468.png") > > > proc.time() user system elapsed 0.601 0.316 0.707