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(13.81,13.9,13.91,13.94,13.96,14.01,14.01,14.06,14.09,14.13,14.12,14.13,14.14,14.16,14.21,14.26,14.29,14.32,14.33,14.39,14.48,14.44,14.46,14.48,14.53,14.58,14.62,14.62,14.61,14.65,14.68,14.7,14.78,14.84,14.89,14.89,15.13,15.25,15.33,15.36,15.4,15.4,15.41,15.47,15.54,15.55,15.59,15.65,15.75,15.86,15.89,15.94,15.93,15.95,15.99,15.99,16.06,16.08,16.07,16.11,16.15,16.18,16.3,16.42,16.49,16.5,16.58,16.64,16.66,16.81,16.91,16.92,16.95,17.11,17.16,17.16,17.27,17.34,17.39,17.43,17.45,17.5,17.56,17.65) > 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/1jv251289846262.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/2jv251289846262.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.964014088 0.929410679 0.894690672 0.859749058 [6] 0.823793058 0.788017170 0.751628051 0.715626872 0.680978251 [11] 0.645765806 0.609816013 0.575742571 0.540903149 0.504887042 [16] 0.470164380 0.438044215 0.405552447 0.373392436 0.341788348 [21] 0.310051161 0.279829958 0.250373226 0.222596405 0.194605505 [26] 0.167019627 0.139836017 0.111907923 0.083209259 0.054743198 [31] 0.025649971 -0.003399379 -0.032871006 -0.062377681 -0.091259933 [36] -0.119839793 -0.147209942 -0.169906727 -0.190714998 -0.210215300 [41] -0.229839160 -0.248429914 -0.266551768 -0.285033477 -0.303394732 [46] -0.320704324 -0.337986748 -0.353783680 -0.367085696 > (mypacf <- c(rpacf$acf)) [1] 0.964014088 0.001238254 -0.019222421 -0.021515962 -0.033268606 [6] -0.017699615 -0.028578681 -0.015523515 -0.001382921 -0.027908629 [11] -0.031984709 0.003673513 -0.031924335 -0.039566675 -0.006263847 [16] 0.013799800 -0.025499158 -0.019252850 -0.016012218 -0.024992880 [21] -0.003781606 -0.013782368 0.002389382 -0.024735338 -0.020944476 [26] -0.017953408 -0.034052902 -0.038931063 -0.024617877 -0.034514030 [31] -0.027268193 -0.035495897 -0.031182817 -0.021728371 -0.028885946 [36] -0.014333545 0.037229180 0.001014042 -0.009469102 -0.028882072 [41] -0.015598634 -0.023174850 -0.035675984 -0.028335856 -0.014214201 [46] -0.031116085 -0.012653840 0.006317375 > 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/3fniv1289846262.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/41ohj1289846262.tab") > > try(system("convert tmp/1jv251289846262.ps tmp/1jv251289846262.png",intern=TRUE)) character(0) > try(system("convert tmp/2jv251289846262.ps tmp/2jv251289846262.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.573 0.315 0.723