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(11.73,11.74,11.65,11.38,11.53,11.75,11.82,11.83,11.63,11.55,11.4,11.4,11.63,11.46,11.35,11.7,11.52,11.64,11.9,11.73,11.7,11.54,11.97,11.64,11.98,11.79,11.66,11.96,11.83,12.36,12.53,12.55,12.53,12.24,12.34,12.05,12.22,12.23,11.92,12.13,12.1,12.15,12.23,12.08,12.02,11.93,12.16,11.87,11.93,11.79,11.43,11.63,11.93,11.89,11.83,11.59,12.04,11.81,11.9,11.72,11.91,11.94,11.91,11.84,12.01,11.89,11.8,11.7,11.5,11.76,11.61,11.27,11.64,11.39,11.54,11.62,11.59,11.44,11.31,11.56,11.4,11.51,11.5,11.24,11.8) > par5 = '12' > par4 = '0' > par3 = '0' > 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: 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/1po1z1249487078.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/2j08l1249487078.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.00000000 0.74139070 0.69086015 0.61385393 0.51662777 0.52824268 [7] 0.42839942 0.40961382 0.31357065 0.29219930 0.29976205 0.20423095 [13] 0.24387701 0.09172615 0.02170476 -0.01509299 -0.07773849 -0.10104163 [19] -0.16606314 -0.20912278 -0.22393847 -0.20972182 -0.15483179 -0.13558262 [25] -0.10452776 -0.17454155 -0.20482162 -0.20125286 -0.19614949 -0.21029135 [31] -0.19520971 -0.21726248 -0.20878692 -0.19084564 -0.21524759 -0.24736621 [37] -0.26440956 -0.31251401 -0.29598696 -0.31477499 -0.29176951 -0.31949454 [43] -0.29848889 -0.29487327 -0.29051450 -0.22153103 -0.25041658 -0.21706635 [49] -0.21802402 > (mypacf <- c(rpacf$acf)) [1] 0.7413906956 0.3135409746 0.0733747168 -0.0665413530 0.1744672516 [6] -0.0954696905 0.0327448549 -0.1418733376 0.0774357330 0.0891036581 [11] -0.1331629521 0.0983467113 -0.2723823986 -0.1265518434 -0.0270821626 [16] 0.0256970161 -0.1080443696 -0.0005289353 -0.1035834126 0.0869932301 [21] 0.0757942364 0.0951396545 0.1451584866 0.0165273313 -0.1871295063 [26] -0.0956518717 -0.0269547336 0.0248177011 -0.0622769913 0.0514754569 [31] -0.0569417659 -0.0520928317 -0.1104257879 -0.1664722780 -0.1582552230 [36] -0.0398230089 -0.0403494333 0.1000622804 -0.0537738133 0.0376023284 [41] 0.0061879576 0.0891938545 -0.0072209227 0.0085333185 0.0656070481 [46] -0.1218066048 0.0289029169 -0.0990101337 > 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/325t01249487078.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/47x5f1249487078.tab") > > system("convert tmp/1po1z1249487078.ps tmp/1po1z1249487078.png") > system("convert tmp/2j08l1249487078.ps tmp/2j08l1249487078.png") > > > proc.time() user system elapsed 0.579 0.320 0.823