R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(10 + ,10 + ,10 + ,10 + ,10 + ,9.94 + ,10.06 + ,10.06 + ,10.06 + ,10.06 + ,10.06 + ,10.06 + ,10.06 + ,10.06 + ,10.06 + ,10.06 + ,10.06 + ,10.06 + ,10.06 + ,10.06 + ,9.94 + ,9.94 + ,9.94 + ,9.94 + ,9.94 + ,9.94 + ,10.06 + ,10.06 + ,9.94 + ,10.06 + ,10.06 + ,10.06 + ,10.18 + ,10.28 + ,10.28 + ,10.18 + ,10.28 + ,10.28 + ,10.28 + ,10.18 + ,10.28 + ,10.28 + ,10.18 + ,10.18 + ,10.18 + ,10.28 + ,10.28 + ,10.18 + ,10.18 + ,10.18 + ,10.18 + ,10.18 + ,10.18 + ,10.28 + ,10.28 + ,10.28 + ,10.18 + ,10.18 + ,10.18 + ,10.28 + ,10.18 + ,10.18 + ,10.28 + ,10.18 + ,10.18 + ,10.18 + ,10.28 + ,10.28 + ,10.28 + ,10.28 + ,10.28 + ,10.28 + ,10.18 + ,10.18 + ,10.18 + ,10.18 + ,10.18 + ,10.18 + ,10.18 + ,10.18 + ,10.18 + ,10.28 + ,10.28 + ,10.28 + ,10.28 + ,10.28 + ,10.28 + ,10.28 + ,10.28 + ,10.18 + ,10.28 + ,10.28 + ,10.28 + ,10.28 + ,10.18 + ,10.28 + ,10.28 + ,10.28 + ,10.18 + ,10.18 + ,10.28 + ,10.28 + ,10.28 + ,10.28 + ,10.28 + ,10.28 + ,10.28 + ,10.18 + ,10.28 + ,10.28 + ,10.28 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.34 + ,10.34 + ,10.34 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.34 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.34 + ,10.34 + ,10.34 + ,10.34 + ,10.42 + ,10.42 + ,10.34 + ,10.34 + ,10.34 + ,10.42 + ,10.42 + ,10.42 + ,10.34 + ,10.34 + ,10.34 + ,10.34 + ,10.34 + ,10.42 + ,10.42 + ,10.42 + ,10.34 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.34 + ,10.34 + ,10.34 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.42 + ,10.34 + ,10.34 + ,10.42 + ,10.42 + ,10.55 + ,10.55 + ,10.55 + ,10.55 + ,10.55 + ,10.55 + ,10.55 + ,10.55 + ,10.55 + ,10.55 + ,10.49 + ,10.49 + ,10.55 + ,10.55 + ,10.55 + ,10.55 + ,10.55 + ,10.55 + ,10.49 + ,10.55 + ,10.55 + ,10.55 + ,10.55 + ,10.55 + ,10.55 + ,10.49 + ,10.49 + ,10.55 + ,10.55 + ,10.55 + ,10.49 + ,10.55 + ,10.55 + ,10.55 + ,10.55 + ,10.55 + ,10.55 + ,10.55 + ,10.55 + ,10.55 + ,10.49 + ,10.49 + ,10.49 + ,10.55 + ,10.55 + ,10.55 + ,10.49 + ,10.55 + ,10.55 + ,10.55 + ,10.63 + ,10.63 + ,10.63 + ,10.63 + ,10.63 + ,10.57 + ,10.63 + ,10.63 + ,10.63 + ,10.63 + ,10.57 + ,10.57 + ,10.57 + ,10.63 + ,10.63 + ,10.63 + ,10.63 + ,10.57 + ,10.63 + ,10.63 + ,10.57 + ,10.63 + ,10.63 + ,10.63 + ,10.63 + ,10.57 + ,10.63 + ,10.6 + ,10.7 + ,10.7 + ,10.7 + ,10.7 + ,10.7 + ,10.7 + ,10.7 + ,10.7 + ,10.7 + ,10.7 + ,10.6 + ,10.6 + ,10.6 + ,10.6 + ,10.7 + ,10.7 + ,10.6 + ,10.7 + ,10.7 + ,10.7 + ,10.7 + ,10.7 + ,10.7 + ,10.7 + ,10.7 + ,10.7 + ,10.7 + ,10.7 + ,10.7 + ,10.7 + ,10.7 + ,10.8 + ,10.8 + ,10.8 + ,10.8 + ,10.7 + ,10.7 + ,10.7 + ,10.85 + ,10.75 + ,10.75 + ,10.75 + ,10.75 + ,10.75 + ,10.75 + ,10.75 + ,10.75 + ,10.75 + ,10.75 + ,10.75 + ,10.85 + ,10.85 + ,10.85 + ,10.85 + ,10.85 + ,10.85 + ,10.85 + ,10.85 + ,10.85 + ,10.85 + ,10.75 + ,10.75 + ,10.85 + ,10.85 + ,10.85 + ,10.85 + ,10.75 + ,10.75 + ,10.75 + ,10.75 + ,10.75) > par8 = '' > par7 = '0.95' > par6 = 'White Noise' > par5 = '1' > 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/rcomp/tmp/1hbhz1293363059.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/rcomp/tmp/2hbhz1293363059.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.210985197 -0.129438631 -0.051290110 -0.035155930 [6] 0.064593063 -0.097305055 0.084767041 0.019631286 0.000390249 [11] -0.128458869 -0.057127536 0.038860726 -0.014381868 0.070845915 [16] -0.009014705 0.013349226 -0.079537238 -0.035369178 0.097431249 [21] -0.047074195 0.081216600 -0.056127633 -0.053585637 0.066472118 [26] -0.062377000 0.063426114 -0.031442544 -0.042291510 0.054911383 [31] 0.045277047 0.005626638 -0.056333388 0.064768203 0.014640485 [36] -0.075435369 0.010925096 0.019413672 0.035264682 -0.030033754 [41] -0.055058691 -0.069790095 0.030990969 -0.038392343 0.027579846 [46] 0.098953370 -0.097573498 0.046249483 -0.059945994 > (mypacf <- c(rpacf$acf)) [1] -0.210985197 -0.182057635 -0.132042720 -0.115529783 -0.003810121 [6] -0.124413511 0.031343494 0.018075451 0.023419359 -0.129006289 [11] -0.116373061 -0.076155898 -0.083007645 0.005139681 -0.010047844 [16] 0.001498992 -0.082087260 -0.068807322 0.034618355 -0.062282569 [21] 0.033925405 -0.050827384 -0.093769573 0.019461052 -0.046865692 [26] 0.018458082 -0.039432876 -0.102284499 0.001783191 0.057327419 [31] 0.041436245 -0.013314241 0.038975923 0.037316677 -0.064614028 [36] 0.012495415 0.013927659 0.005712659 0.005938446 -0.057467672 [41] -0.100085547 -0.035043526 -0.098480013 -0.018570052 0.022710923 [46] -0.083092702 0.029951226 -0.063224617 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/3dkx81293363059.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/rcomp/tmp/4h3dw1293363059.tab") > > try(system("convert tmp/1hbhz1293363059.ps tmp/1hbhz1293363059.png",intern=TRUE)) character(0) > try(system("convert tmp/2hbhz1293363059.ps tmp/2hbhz1293363059.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.66 0.43 1.10