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(361.58,363.19,363.61,364.14,365.51,365.51,365.5,365.5,364.59,364.63,364.54,363.67,365.22,369.05,370.45,370.46,370.46,370.58,370.58,370.22,370.21,370.29,370.29,370.2,370.2,372.55,374.51,375.58,375.75,375.75,375.75,375.69,375.76,377.5,377.51,377.74,369.82,373.1,374.55,375.01,374.81,375.31,375.31,375.39,375.59,376.26,377.18,377.26,377.26,381.87,387.09,387.14,388.78,389.16,389.16,389.42,389.49,388.97,388.97,389.09,389.09,391.76,390.96,391.76,392.8,393.06,393.06,393.26,393.87,394.47,394.57,394.57,394.57,399.57,406.13,407.03,409.46,409.9,409.9,410.14,410.54,410.69,410.79,410.97) > 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/1m9n01290009248.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/2m9n01290009248.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.152601422 -0.011123050 -0.043047548 -0.018443939 [6] -0.071258471 -0.060954836 -0.092818858 -0.053606664 -0.066383932 [11] -0.117245931 0.015685131 0.236496664 0.016219001 -0.175876731 [16] 0.017032214 -0.085294943 -0.047412728 -0.057991661 -0.038815578 [21] -0.014020308 0.023788162 -0.033558703 0.026134600 0.349096328 [26] 0.132099933 0.078230416 0.006899804 0.008837613 -0.051067680 [31] -0.041210748 -0.044241216 -0.088634708 -0.054953185 -0.032113661 [36] 0.005337526 0.206647025 -0.001017268 -0.211514081 -0.026737409 [41] -0.077771858 -0.033667737 -0.055190639 -0.031948834 -0.076768569 [46] -0.036579602 0.015344251 0.056657147 0.132798977 > (mypacf <- c(rpacf$acf)) [1] 0.152601422 -0.035230668 -0.036816080 -0.006578073 -0.070875005 [6] -0.042505743 -0.083301408 -0.036750775 -0.065152522 -0.118976505 [11] 0.034435613 0.213714708 -0.077560376 -0.199279755 0.072340605 [16] -0.127517483 -0.039817567 -0.044245581 -0.040517854 -0.024276668 [21] 0.006088005 -0.021258916 -0.026802245 0.281224919 0.040915028 [26] 0.120115067 -0.036158908 0.033228162 0.013847972 -0.031378285 [31] 0.055012559 -0.100650933 0.007807894 0.054967641 0.032632659 [36] 0.091946435 -0.088627438 -0.170712385 0.023070433 -0.025232346 [41] -0.030308993 -0.007042972 -0.037448585 -0.059626528 -0.056243560 [46] -0.001044906 0.003251023 -0.090049740 > 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/30j2r1290009248.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/4takc1290009248.tab") > > try(system("convert tmp/1m9n01290009248.ps tmp/1m9n01290009248.png",intern=TRUE)) character(0) > try(system("convert tmp/2m9n01290009248.ps tmp/2m9n01290009248.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.585 0.322 1.208