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(10519.20,10414.90,12476.80,12384.60,12266.70,12919.90,11497.30,12142.00,13919.40,12656.80,12034.10,13199.70,10881.30,11301.20,13643.90,12517.00,13981.10,14275.70,13425.00,13565.70,16216.30,12970.00,14079.90,14235.00,12213.40,12581.00,14130.40,14210.80,14378.50,13142.80,13714.70,13621.90,15379.80,13306.30,14391.20,14909.90,14025.40,12951.20,14344.30,16093.40,15413.60,14705.70,15972.80,16241.40,16626.40,17136.20,15622.90,18003.90,16136.10,14423.70,16789.40,16782.20,14133.80,12607.00,12004.50,12175.40,13268.00,12299.30,11800.60,13873.30,12315.00) > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > 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/1hbog1262188737.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/230hy1262188737.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.332440924 -0.269029270 0.317749940 -0.099854965 [6] -0.108045058 0.270951289 -0.251438617 0.032478958 0.245238901 [11] -0.380370662 -0.082853347 0.497202048 -0.206086184 -0.170625126 [16] 0.121374278 0.007600855 -0.048470525 0.053427668 -0.021525206 [21] 0.010233032 -0.005437694 -0.084954329 -0.074014155 0.171111370 [26] 0.143633471 -0.299823321 0.100747260 0.096576719 -0.119559945 [31] 0.037369680 0.156707430 -0.159253401 0.029270864 0.068357480 [36] -0.216907117 0.166181716 0.088029798 -0.262741843 0.135001721 [41] 0.050348157 -0.135791517 0.126941888 0.071504917 -0.162937655 [46] 0.116367435 -0.053962874 -0.086549788 0.131370695 -0.034920513 [51] -0.085638965 0.040954351 -0.023050546 -0.034110863 0.051999176 [56] -0.029853608 -0.008385788 0.038782346 -0.030751998 0.001872363 > (mypacf <- c(rpacf$acf)) [1] -3.324409e-01 -4.267043e-01 6.638465e-02 -5.854422e-02 -3.862850e-02 [6] 1.948961e-01 -1.423031e-01 4.573443e-02 1.264155e-01 -2.474242e-01 [11] -3.009645e-01 2.092379e-01 1.835660e-01 -7.141106e-03 -1.997748e-01 [16] 9.549150e-02 6.719773e-04 -1.548346e-01 1.450607e-01 4.010218e-02 [21] -2.595955e-01 -4.451269e-03 7.521085e-02 -1.330397e-01 1.595978e-01 [26] 3.534018e-02 1.106599e-01 -2.004468e-01 5.847314e-02 1.081875e-01 [31] -4.174585e-02 -2.306821e-02 7.809111e-02 5.124071e-02 -1.664612e-01 [36] 1.046433e-02 -6.342792e-02 -9.110500e-02 1.668817e-05 1.471207e-01 [41] 2.171238e-02 -4.632563e-03 7.736442e-02 -1.003609e-02 -2.493852e-02 [46] -1.020930e-01 3.010739e-02 -2.911874e-02 -8.739773e-02 -1.979592e-02 [51] 1.241898e-03 -4.549803e-02 1.437412e-03 -5.860611e-02 -5.918648e-02 [56] -1.047480e-01 4.968464e-02 8.173162e-02 -8.860546e-02 > 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/3o4t71262188737.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/4e5pm1262188737.tab") > > try(system("convert tmp/1hbog1262188737.ps tmp/1hbog1262188737.png",intern=TRUE)) character(0) > try(system("convert tmp/230hy1262188737.ps tmp/230hy1262188737.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.617 0.345 0.884