R version 2.7.0 (2008-04-22) 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(90.8,96.4,90,92.1,97.2,95.1,88.5,91,90.5,75,66.3,66,68.4,70.6,83.9,90.1,90.6,87.1,90.8,94.1,99.8,96.8,87,96.3,107.1,115.2,106.1,89.5,91.3,97.6,100.7,104.6,94.7,101.8,102.5,105.3,110.3,109.8,117.3,118.8,131.3,125.9,133.1,147,145.8,164.4,149.8,137.7,151.7,156.8,180,180.4,170.4,191.6,199.5,218.2,217.5,205,194,199.3) > 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: 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/11mla1229715980.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/232591229715980.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.051024620 -0.144023590 -0.151792947 -0.178162595 [6] 0.409404069 0.028174818 -0.131468458 -0.150365751 -0.126241388 [11] 0.253541152 0.102740768 -0.007892198 -0.117914724 -0.040691407 [16] 0.076901483 -0.056368274 0.075174594 -0.147821637 0.073974410 [21] 0.195251775 -0.059218602 -0.048202799 -0.205523652 0.034067368 [26] 0.222322212 0.017200501 -0.130041101 -0.157021723 -0.015180623 [31] 0.204199324 0.067958757 -0.071564319 -0.185592106 -0.089596728 [36] 0.074095935 0.066980290 0.025626104 -0.035440386 -0.011736946 [41] -0.024552584 0.024497697 -0.010363708 -0.101650166 -0.106008266 [46] -0.064642328 -0.045821209 0.019291651 0.013297177 0.042740224 [51] 0.006806599 -0.006921772 0.038979185 -0.029776902 0.005254535 [56] 0.024404002 0.011048455 -0.016084981 0.002726164 > (mypacf <- c(rpacf$acf)) [1] 0.051024620 -0.147009844 -0.139226326 -0.193621205 0.409435932 [6] -0.114632898 -0.077593649 -0.109251746 0.035814258 0.053778675 [11] 0.034427464 0.042476490 -0.035022897 0.100178393 -0.089067266 [16] -0.135637583 0.109400228 -0.107067169 0.156965338 0.118974584 [21] -0.002359754 -0.186634725 -0.054867918 0.019461223 0.074153748 [26] 0.055657520 -0.135589100 0.067669963 -0.060856652 0.024571087 [31] -0.119445988 0.107288884 -0.070843984 -0.061802652 -0.029953255 [36] -0.061849807 0.041073596 0.077878148 0.041988194 -0.121172095 [41] 0.041732222 -0.072814909 -0.133705918 -0.120432228 -0.101888151 [46] -0.033841306 0.022571222 0.071156026 -0.049218547 -0.053821062 [51] 0.013963807 0.053571957 0.051149490 -0.021644070 0.059748216 [56] -0.003109533 -0.019329313 -0.052921812 > 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/3e7251229715980.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/4ix291229715980.tab") > > system("convert tmp/11mla1229715980.ps tmp/11mla1229715980.png") > system("convert tmp/232591229715980.ps tmp/232591229715980.png") > > > proc.time() user system elapsed 1.549 0.545 1.644