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(180144,173666,165688,161570,156145,153730,182698,200765,176512,166618,158644,159585,163095,159044,155511,153745,150569,150605,179612,194690,189917,184128,175335,179566,181140,177876,175041,169292,166070,166972,206348,215706,202108,195411,193111,195198,198770,194163,190420,189733,186029,191531,232571,243477,227247,217859,208679,213188,216234,213586,209465,204045,200237,203666,241476,260307,243324,244460,233575,237217,235243,230354,227184,221678,217142,219452,256446,265845,248624,241114,229245,231805,219277,219313,212610,214771,211142,211547,240048,240636,230580,208795,197922,194596,194581,185686,178106,172608,167302,168053,202300,202388,182516,173476,166444,171397,169701,164182,161914,159612,151001,158114,186530,187069,174330,169362,166827,178037,186413,189226,191563,188906,186005,195309,223532,226899,214126,206903,204442,220375,214320,212588,205816,202196,195722,198563,229139,229527,211868,203555,195770) > par8 = '' > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '1' > par3 = '1' > 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: > 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/164ug1292874674.ps",horizontal=F,onefile=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/264ug1292874674.ps",horizontal=F,onefile=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.018777111 0.227029427 0.013897383 0.167660125 [6] 0.128113011 0.036303888 0.100627876 -0.023916326 0.168241122 [11] 0.002100123 0.085381821 -0.280829980 0.057645208 0.076172402 [16] -0.042385413 -0.059147978 -0.135974416 0.071136879 -0.003854363 [21] 0.009574028 -0.044384517 -0.079361962 -0.080585787 -0.154193963 [26] -0.036217808 -0.192691433 -0.094730559 -0.046990907 -0.079967726 [31] -0.172891845 -0.134155375 -0.052150598 0.018135538 -0.041283714 [36] 0.072827435 -0.026690636 0.014666098 -0.096612181 0.031322742 [41] -0.092033666 0.059157485 0.012051535 0.035135632 -0.035570216 [46] -0.068362724 0.039139544 -0.107919593 -0.004202279 > (mypacf <- c(rpacf$acf)) [1] -0.018777111 0.226756796 0.022622297 0.123240843 0.134712604 [6] -0.019228258 0.048343994 -0.049164490 0.108202230 0.006888146 [11] 0.011880160 -0.315742954 -0.007171277 0.183141845 -0.064016456 [16] -0.081446852 -0.070065277 0.062363112 0.092236113 -0.022403156 [21] 0.031504519 -0.064998071 -0.125591819 -0.276790796 0.012169281 [26] 0.036410408 -0.133773705 -0.033174065 -0.052626316 -0.081001861 [31] 0.010379136 0.026610785 0.196737459 0.021350238 0.095967753 [36] -0.075546668 0.037123475 -0.141811034 -0.126522955 -0.089064118 [41] 0.026764412 -0.043133623 0.004323854 -0.024556093 0.052805237 [46] -0.013610963 -0.062662766 -0.059794081 > 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/3r5b41292874674.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/4v59s1292874674.tab") > > try(system("convert tmp/164ug1292874674.ps tmp/164ug1292874674.png",intern=TRUE)) character(0) > try(system("convert tmp/264ug1292874674.ps tmp/264ug1292874674.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.581 0.338 1.298