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(81.28,69.39,67.63,51.25,103.97,133.83,162.37,172.91,163.01,151.50,111.73,88.58,74.29,63.98,61.18,76.48,107.98,124.97,145.57,140.20,143.84,138.80,104.06,74.70,60.18,55.16,35.62,56.18,85.44,114.08,133.64,67.14,95.58,89.37,75.24,69.18,54.49,57.50,62.16,76.67,110.04,127.38,156.47,167.56,153.54,124.08,100.97,79.17,68.13,61.77,54.31,60.30,84.18,104.05,114.66,105.55,96.61,70.94,63.91,58.61,44.53,49.58,57.39,76.76,104.57,125.41,143.11,136.35,135.15,131.70,96.87,70.63,66.29,63.49,62.97,66.43,101.49,127.69,133.21,158.72,148.61,134.31,100.99,75.16,59.74,52.87,52.07,57.38,79.43,101.40,120.19,134.38,135.97,113.83,84.38,70.28,65.96,56.36,49.57,68.33,90.32,117.06,134.69,131.67,129.25,118.77,88.44,76.79,75.28,73.89,76.24,88.58,105.83,115.84,127.76,131.75,119.63,93.38,75.55,51.79) > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1' > par1 = '60' > #'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/19via1272557435.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/29via1272557435.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.490431126 0.268553709 -0.029328509 -0.341535966 [6] -0.471063605 -0.660847307 -0.476492737 -0.258124917 -0.005610527 [11] 0.279524048 0.474262657 0.595238074 0.451155403 0.246966889 [16] -0.069781421 -0.268103200 -0.494986809 -0.562273599 -0.415957849 [21] -0.203300377 0.043739888 0.227300598 0.481142746 0.513653005 [26] 0.378245137 0.218190600 -0.108768996 -0.208166579 -0.406799848 [31] -0.455350243 -0.351699262 -0.206952181 0.020020563 0.230990119 [36] 0.383132343 0.495986887 0.374754239 0.171596451 -0.007736558 [41] -0.236804739 -0.379309408 -0.398643334 -0.312985280 -0.133122013 [46] -0.026411159 0.156875971 0.347289457 0.351996841 0.320465890 [51] 0.122251964 -0.028605992 -0.163624268 -0.318419640 -0.340001141 [56] -0.285152759 -0.130616529 0.006584904 0.150471306 0.288440005 [61] 0.322328233 > (mypacf <- c(rpacf$acf)) [1] 0.490431126 0.036908304 -0.229780701 -0.353288377 -0.221792455 [6] -0.447390953 -0.150765110 -0.114936583 -0.106839354 -0.053627830 [11] 0.076941423 0.130102273 0.012282499 0.029628655 -0.117910361 [16] 0.033963060 -0.137477875 -0.099331915 -0.043619890 0.022723944 [21] -0.099115068 -0.129635242 0.073456512 -0.027583150 -0.082042473 [26] 0.021827289 -0.146209349 0.077485743 0.040816169 -0.014784246 [31] -0.054464296 -0.031990446 -0.137027199 0.023940817 -0.023879429 [36] 0.114368211 0.012684619 -0.007964787 0.045918720 -0.024720255 [41] 0.022046624 0.053211815 0.119093950 0.065890089 -0.056490711 [46] -0.060109353 0.100308919 -0.076563240 0.013314909 -0.059368433 [51] -0.029837751 -0.004631278 0.036142390 -0.068927031 -0.005278153 [56] -0.008348499 -0.044614635 -0.015273263 -0.012961694 -0.039294971 > 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/3cvgg1272557435.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/4fexm1272557435.tab") > > try(system("convert tmp/19via1272557435.ps tmp/19via1272557435.png",intern=TRUE)) character(0) > try(system("convert tmp/29via1272557435.ps tmp/29via1272557435.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.605 0.320 0.757