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(1.64,1.65,1.65,1.65,1.66,1.66,1.67,1.67,1.68,1.68,1.68,1.68,1.69,1.69,1.7,1.7,1.71,1.71,1.71,1.71,1.72,1.72,1.72,1.73,1.73,1.73,1.74,1.75,1.75,1.76,1.76,1.77,1.77,1.78,1.79,1.8,1.8,1.81,1.81,1.81,1.81,1.82,1.82,1.82,1.83,1.83,1.83,1.84,1.84,1.85,1.85,1.86,1.86,1.86,1.86,1.86) > par8 = '' > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > par3 = '1' > 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/1j0lp1293185075.ps",horizontal=F,onefile=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/2j0lp1293185075.ps",horizontal=F,onefile=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.000000e+00 -4.212121e-01 1.727273e-01 -6.666667e-02 1.787879e-01 [6] -3.333333e-01 1.393939e-01 6.060606e-03 1.757576e-01 -2.606061e-01 [11] 1.060606e-01 -5.757576e-02 -9.090909e-03 -9.696970e-02 7.272727e-02 [16] 1.666667e-01 -1.939394e-01 2.121212e-02 9.090909e-03 -4.848485e-02 [21] -1.060606e-01 1.393939e-01 -6.969697e-02 5.454545e-02 -1.848485e-01 [26] 1.363636e-01 -1.484848e-01 5.151515e-02 -3.636364e-02 8.787879e-02 [31] -4.545455e-02 4.848485e-02 -1.151515e-01 1.606061e-01 -1.242424e-01 [36] 1.212121e-01 -1.212121e-02 8.181818e-02 -8.181818e-02 -1.818182e-02 [41] 5.133533e-18 1.818182e-02 -1.151515e-01 1.757576e-01 -7.878788e-02 [46] 6.060606e-02 -2.727273e-02 -9.090909e-03 9.090909e-03 > (mypacf <- c(rpacf$acf)) [1] -0.421212121 -0.005704462 0.004984955 0.186337868 -0.243883118 [6] -0.136032146 0.075916510 0.297348091 -0.077448737 -0.262355038 [11] -0.143426000 0.074419999 0.146732985 -0.117411294 0.084811250 [16] -0.097170946 -0.051148526 -0.044712515 -0.074221204 -0.023814219 [21] 0.051019518 -0.096458465 -0.092217339 -0.136378759 0.002840094 [26] -0.002519852 -0.055480557 -0.059480036 -0.094365133 0.007588123 [31] 0.102279165 -0.099623409 -0.013494750 0.002119422 0.084718920 [36] 0.035218067 -0.010502100 -0.056625142 -0.092523024 -0.015407065 [41] 0.032822771 -0.137585904 0.026172954 0.006329744 0.047079533 [46] 0.043533666 -0.090200457 -0.079181343 > 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/3n1kd1293185075.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/4q1ij1293185075.tab") > > try(system("convert tmp/1j0lp1293185075.ps tmp/1j0lp1293185075.png",intern=TRUE)) character(0) > try(system("convert tmp/2j0lp1293185075.ps tmp/2j0lp1293185075.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.577 0.323 19.448