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(562.325,560.854,555.332,543.599,536.662,542.722,593.530,610.763,612.613,611.324,594.167,595.454,590.865,589.379,584.428,573.100,567.456,569.028,620.735,628.884,628.232,612.117,595.404,597.141,593.408,590.072,579.799,574.205,572.775,572.942,619.567,625.809,619.916,587.625,565.742,557.274,560.576,548.854,531.673,525.919,511.038,498.662,555.362,564.591,541.657,527.070,509.846,514.258,516.922,507.561,492.622,490.243,469.357,477.580,528.379,533.590,517.945,506.174,501.866,516.141,528.222,532.638,536.322,536.535,523.597,536.214,586.570,596.594,580.523,564.478,557.560,575.093) > 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/1n4if1291711973.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/2n4if1291711973.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.000000000 0.263914008 -0.236146112 -0.315846386 -0.217368136 [6] 0.102396492 0.191659157 0.062854666 -0.202068260 -0.260346986 [11] -0.199096466 0.260095473 0.765503754 0.145529988 -0.240216451 [16] -0.318193709 -0.207239981 0.081407614 0.138862934 0.027369952 [21] -0.203323455 -0.232130506 -0.141477554 0.219365553 0.560806300 [26] 0.066766549 -0.243895859 -0.292154781 -0.160423828 0.072320761 [31] 0.097395623 0.010093192 -0.186837171 -0.175985270 -0.082598292 [36] 0.163275700 0.399829128 0.055189866 -0.187871905 -0.186522899 [41] -0.084623012 0.076547066 0.070286592 0.003952665 -0.106840840 [46] -0.086002264 -0.045524010 0.122114905 0.254775472 > (mypacf <- c(rpacf$acf)) [1] 0.263914008 -0.328690186 -0.176291795 -0.175873048 0.098964252 [6] -0.007551461 -0.024472264 -0.208615717 -0.116924792 -0.238901222 [11] 0.268559790 0.641186639 -0.236456360 0.079800518 -0.014458863 [16] -0.046361514 -0.137457594 -0.073814478 -0.021467973 -0.123076929 [21] -0.045584751 0.035764392 -0.147339668 -0.042941706 -0.014970692 [26] -0.086246066 -0.026777858 0.004293961 -0.044182112 -0.079605940 [31] -0.010281574 -0.030605280 -0.038133920 -0.045729529 -0.098900031 [36] -0.079623911 0.051864560 -0.014431309 0.090922688 -0.005589565 [41] 0.041439881 -0.047355163 -0.003426281 0.115723490 -0.025648909 [46] -0.062565282 0.062332880 -0.151908937 > 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/31wx51291711973.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/4u5f81291711973.tab") > > try(system("convert tmp/1n4if1291711973.ps tmp/1n4if1291711973.png",intern=TRUE)) character(0) > try(system("convert tmp/2n4if1291711973.ps tmp/2n4if1291711973.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.577 0.321 1.292