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(121.67,121.65,121.61,121.5,121.41,121.41,121.4,121.38,121.34,121.19,120.96,120.96,120.96,120.9,120.86,120.73,120.53,120.53,120.53,120.52,120.51,120.43,120.29,120.27,120.27,120.24,120.21,120.06,119.86,119.85,119.85,119.83,119.71,119.57,119.2,119.13,119.13,119.09,118.9,118.54,118.12,118.11,118.1,118.08,117.91,117.63,117.28,117.2,117.17,117.14,116.96,116.34,115.99,115.99,115.97,115.92,115.63,115.31,115.13,115.09,115.07,115.01,114.64,113.86,113.34,113.33,113.32,113.26,113.2,112.61,112.28,112.16) > 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/1jvt01272899650.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/2jvt01272899650.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.95381292 0.90521881 0.85885592 0.81877293 0.77851811 [7] 0.73568883 0.68849355 0.63819044 0.59219812 0.55483604 0.52163924 [13] 0.48625705 0.44724394 0.40637679 0.36660562 0.33044794 0.29741341 [19] 0.26230293 0.22413423 0.18391990 0.14664430 0.11605171 0.08718426 [25] 0.05644919 0.02327706 -0.01060368 -0.04126473 -0.06842123 -0.09337877 [31] -0.12002882 -0.14876453 -0.17864335 -0.20389051 -0.22472605 -0.24186325 [37] -0.25964261 -0.27899333 -0.29829553 -0.31288109 -0.32401930 -0.33173630 [43] -0.34024880 -0.34984020 -0.35982460 -0.36690303 -0.37083984 -0.37271062 [49] -0.37465784 > (mypacf <- c(rpacf$acf)) [1] 9.538129e-01 -5.031280e-02 -5.580403e-05 4.353344e-02 -2.715378e-02 [6] -4.823685e-02 -6.761822e-02 -6.190571e-02 1.407640e-02 5.884512e-02 [11] 1.657307e-02 -3.766941e-02 -4.873289e-02 -4.243359e-02 -2.659256e-02 [16] -4.909553e-03 -1.726132e-03 -4.166036e-02 -4.232529e-02 -4.226418e-02 [21] -7.379394e-03 2.754259e-02 -2.035314e-02 -4.172126e-02 -3.815713e-02 [26] -3.283501e-02 -7.243806e-03 -1.209974e-02 -1.600932e-02 -3.764958e-02 [31] -3.483485e-02 -3.907608e-02 4.920381e-03 -2.940477e-03 2.382904e-03 [36] -2.531269e-02 -2.947224e-02 -2.302475e-02 7.929795e-03 -1.283762e-02 [41] 2.074768e-03 -2.160485e-02 -1.769292e-02 -2.313298e-02 -7.181201e-03 [46] -1.100685e-02 -9.117331e-03 -1.286848e-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/328yf1272899650.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/48eqt1272899650.tab") > > try(system("convert tmp/1jvt01272899650.ps tmp/1jvt01272899650.png",intern=TRUE)) character(0) > try(system("convert tmp/2jvt01272899650.ps tmp/2jvt01272899650.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.579 0.323 0.744