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(627,696,825,677,656,785,412,352,839,729,696,641,695,638,762,635,721,854,418,367,824,687,601,676,740,691,683,594,729,731,386,331,707,715,657,653,642,643,718,654,632,731,392,344,792,852,649,629,685,617,715,715,629,916,531,357,917,828,708,858,775,785,1006,789,734,906,532,387,991,841) > par7 = '0.95' > par6 = 'White Noise' > 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: > 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/14yrq1260713562.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/2858s1260713562.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.387107097 0.218874575 0.320871563 0.076446181 [6] 0.214129049 0.298616081 0.145951987 0.333951119 0.249593310 [11] 0.102519734 0.160310817 -0.072619091 -0.106655240 0.139822617 [16] 0.071749227 -0.019071110 0.090929284 0.029196738 -0.070133647 [21] 0.011433767 -0.082271358 -0.141425886 -0.089439300 -0.231911012 [26] -0.121553324 -0.120291273 -0.178938252 -0.047273540 -0.080776968 [31] -0.240257256 -0.193562673 -0.261881969 -0.198103661 -0.080788325 [36] -0.099016671 -0.055934298 -0.031352397 -0.085376560 -0.099879950 [41] -0.167883813 -0.120808717 -0.052117558 -0.003127283 -0.003923228 [46] -0.021867617 -0.062903503 -0.058231654 -0.090521746 -0.072913413 [51] 0.003780607 0.007174491 0.024997798 -0.010323527 -0.013603426 [56] -0.007627081 0.008160816 -0.001250532 > (mypacf <- c(rpacf$acf)) [1] 0.387107097 0.081188997 0.250542003 -0.159698463 0.238084754 [6] 0.110511765 0.018438577 0.226295274 -0.021545933 -0.002356247 [11] -0.056376757 -0.232899288 -0.106979144 0.111317814 0.044138354 [16] -0.160923319 0.063735435 0.094073486 -0.108358644 0.081834762 [21] -0.023417137 -0.118905239 -0.109378917 -0.220732033 0.010819113 [26] -0.126787855 0.137858245 0.015358419 0.031936196 -0.016321648 [31] -0.090841628 -0.073099336 0.092405795 0.027301047 -0.018695745 [36] -0.041247980 0.063142927 0.019573094 -0.004660317 -0.037875819 [41] 0.084126790 -0.027320739 -0.031447985 -0.062264075 -0.016916566 [46] -0.059097770 0.013260375 -0.130642867 0.028768393 0.093253870 [51] 0.007200988 -0.016639218 -0.050838192 0.030874069 -0.068582044 [56] -0.043955590 0.001134666 > 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/312f31260713562.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/46q7t1260713562.tab") > > try(system("convert tmp/14yrq1260713562.ps tmp/14yrq1260713562.png",intern=TRUE)) character(0) > try(system("convert tmp/2858s1260713562.ps tmp/2858s1260713562.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.590 0.334 1.282