R version 2.8.0 (2008-10-20) Copyright (C) 2008 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(77.7,78.89,90.2,77.26,80.76,84.93,66.08,71.56,80.78,83.31,85.3,73.94,78.7,81.32,86.8,80.76,84.46,84.21,73.64,70.85,83.78,89.12,78.93,80.54,81.67,82.53,88.2,89.17,83.7,89.79,77.58,70.11,88.07,92.49,83.33,90.05,82.91,88.52,96.42,90.87,86.4,97.47,85.67,79.91,95.73,94.6,91.92,90.38,82.31,87.82,101.29,89.58,87.83,99.95,82.67,84.65,97.83,97.47,97.66,99.14,90.02,100.97,112.48,91.44,108.46,98.41,89.35,92.8,100.43,104.85,108.36,101.54,105.26,101.8,112.36,99.5,104.65,101.13,89.8,87.84,96.41,103.26,100.31,92.33,96.19,96.37,103.06,101.5,101.88,100.85,95.56,87.6,101.18,110.8,101.1,104.42,103.27,100.87,107.8,104.99,100.76,104.46,100.62,87.84,107.31,115.61,103.43,109.93,104.43,106.69,123.1,109.42,101.46,124.48,101.49,100.46,115.51,113.37,115.4,118.2,106.82,110.17,119.91,112.31,110.62,120.37,97.94,103.02,116.36,108.51,122.54,121.32,112.25,109.89,129.58,107.2,118.68,118.25,102.67,104.19,117.74,123.3,122.2,112.71,118.53,115.32,127.36,110.45,122.22,123.39,116.2,109.22,116.98,132.89,125.24,115.68) > par5 = '12' > par4 = '0' > par3 = '0' > 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: Write here your technical program description (don't use hard returns!) > 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 (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/15xv71228848114.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > racf <- acf(x,par1,main='Autocorrelation',xlab='lags',ylab='ACF') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2wsw31228848114.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.773742910 0.698202184 0.758669337 0.688449650 [6] 0.706532504 0.760911965 0.646867865 0.642108832 0.653893908 [11] 0.549010324 0.635749299 0.738973219 0.574396478 0.522236790 [16] 0.535335105 0.480651838 0.524533664 0.554156781 0.469090573 [21] 0.463289714 0.454500456 0.371649789 0.465544135 0.506558611 [26] 0.400681259 0.339157512 0.330667921 0.312235568 0.341946811 [31] 0.347085773 0.307658726 0.288963039 0.257211735 0.214948850 [36] 0.276161111 0.320744502 0.246208354 0.158940914 0.161814860 [41] 0.159661217 0.160303876 0.170475617 0.154336447 0.118467303 [46] 0.100702183 0.071630273 0.091375160 0.163633754 0.096948825 [51] -0.010161954 0.019444215 0.008979577 -0.006356044 0.041569567 [56] 0.004809550 -0.032443382 -0.020262843 -0.061726365 -0.042478711 [61] 0.054245934 > (mypacf <- c(rpacf$acf)) [1] 0.7737429096 0.2479906807 0.4262178846 -0.0083636403 0.2672797919 [6] 0.2157112559 -0.1611666635 0.0638252544 -0.0716470675 -0.1833554310 [11] 0.2770113633 0.3423741675 -0.2697820030 -0.2519880000 -0.1294526302 [16] 0.0428420579 0.0231662046 0.1032652176 0.1038438212 -0.0860376589 [21] -0.0084493849 -0.0440711462 0.0842429754 -0.0716424331 0.0332209178 [26] -0.1856503755 -0.0302990843 0.0969587367 -0.0425724768 -0.0304453666 [31] 0.0957282968 0.0044457022 -0.0493035483 -0.0089993850 0.0003211041 [36] 0.0663163610 -0.0506119455 -0.1060845641 0.0053723490 -0.0299136298 [41] -0.0479707296 -0.0412329897 0.1029250475 0.0048318631 0.0544910974 [46] -0.0249200558 -0.0787520591 0.0425670108 -0.0341837072 -0.1072553354 [51] 0.0403784193 -0.0381528308 -0.0163164770 0.0520659649 -0.0181484924 [56] 0.0313479150 -0.0158370472 0.0548697538 0.0099099350 0.0407761759 > 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/30dui1228848114.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/4w9j81228848114.tab") > > system("convert tmp/15xv71228848114.ps tmp/15xv71228848114.png") > system("convert tmp/2wsw31228848114.ps tmp/2wsw31228848114.png") > > > proc.time() user system elapsed 0.596 0.331 0.715