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(2357402,2199181,2603060,2629720,2638792,2717481,3810804,3871664,2998364,2923432,2712359,2996099,2395029,2483862,3120231,3360606,3177203,3062783,4242509,4026394,3192481,3118695,2782482,3209833,2630190,2592882,3785309,3231539,3421369,3312134,4647303,4289177,3463853,3304422,3006121,3464238,2921118,2624018,3500718,3939351,3467672,3343628,4852445,4597807,3653145,3572079,3334861,3695369,3075704,2852998,3942704,4004560,3822145,3760085,5267816,5271333,4144142,4109749,3896808,4211074,3402318,3279817,4706628,4079499,4344530,4048625,5394915,5611967,4145481,4025610,3552218,3910443) > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > par3 = '0' > 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/111e01261007590.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/282by1261007590.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.63101575 0.36352762 0.34270364 0.32938668 0.13165992 [7] -0.14290914 0.10427449 0.28742869 0.26927192 0.24373486 0.42318431 [13] 0.66924508 0.37429524 0.12523566 0.11849310 0.10759397 -0.05387467 [19] -0.26939291 -0.06783137 0.08341648 0.05592897 0.04725661 0.18742433 [25] 0.39038036 0.16784643 -0.03026477 -0.02399649 -0.03655168 -0.15547258 [31] -0.32720191 -0.17149493 -0.04095019 -0.05553198 -0.06274725 0.02849067 [37] 0.19952349 0.03451466 -0.11943348 -0.13439658 -0.13774886 -0.20908870 [43] -0.34869667 -0.22575325 -0.13540728 -0.14627053 -0.13884198 -0.07362559 [49] 0.02428613 > (mypacf <- c(rpacf$acf)) [1] 0.631015754 -0.057580855 0.227463222 0.050593013 -0.216195338 [6] -0.308165352 0.585510473 0.069295289 0.140422238 0.060964741 [11] 0.254942991 0.176303176 -0.360580494 -0.145665923 -0.023811490 [16] -0.129920075 0.030286693 0.005904066 -0.085406483 -0.140036550 [21] 0.043733943 0.041234855 0.019950612 0.099105001 -0.014497993 [26] -0.045180747 -0.012826057 -0.027271750 0.033561673 -0.023132846 [31] -0.055816803 -0.026369009 0.023889108 -0.096341751 -0.050896739 [36] 0.048354983 -0.054897958 0.013728942 -0.076895850 0.018297879 [41] -0.012016424 0.002710815 0.007082122 -0.087465577 -0.081681504 [46] 0.067475962 0.004208103 -0.210671758 > 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/3i4ct1261007591.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/4kg9h1261007591.tab") > > try(system("convert tmp/111e01261007590.ps tmp/111e01261007590.png",intern=TRUE)) character(0) > try(system("convert tmp/282by1261007590.ps tmp/282by1261007590.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.573 0.326 0.706