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(100 + ,97.56592292 + ,93.71196755 + ,92.69776876 + ,89.65517241 + ,89.04665314 + ,98.98580122 + ,105.6795132 + ,101.6227181 + ,98.37728195 + ,94.11764706 + ,93.30628803 + ,94.72616633 + ,93.30628803 + ,90.87221095 + ,89.85801217 + ,88.43813387 + ,87.42393509 + ,98.17444219 + ,103.4482759 + ,104.0567951 + ,102.0283976 + ,95.53752535 + ,95.53752535 + ,96.55172414 + ,96.34888438 + ,95.3346856 + ,93.50912779 + ,92.29208925 + ,92.49492901 + ,104.8681542 + ,106.4908722 + ,106.0851927 + ,105.2738337 + ,103.2454361 + ,103.8539554 + ,105.2738337 + ,104.8681542 + ,103.4482759 + ,103.2454361 + ,101.6227181 + ,102.8397566 + ,115.4158215 + ,117.6470588 + ,117.2413793 + ,114.6044625 + ,110.9533469 + ,112.5760649 + ,113.9959432 + ,113.7931034 + ,112.5760649 + ,110.3448276 + ,108.9249493 + ,110.1419878 + ,120.4868154 + ,123.9350913 + ,124.3407708 + ,123.9350913 + ,120.4868154 + ,120.6896552 + ,119.8782961 + ,119.4726166 + ,118.4584178 + ,116.2271805 + ,115.010142 + ,115.4158215 + ,125.9634888 + ,127.5862069 + ,127.3833671 + ,124.137931 + ,120.6896552 + ,121.0953347 + ,120.2839757 + ,119.6754564 + ,117.6470588 + ,116.4300203 + ,116.2271805 + ,116.2271805 + ,125.7606491 + ,126.9776876 + ,125.7606491 + ,119.2697769 + ,114.8073022 + ,112.9817444 + ,113.7931034 + ,111.3590264 + ,107.9107505 + ,106.693712 + ,103.6511156 + ,101.2170385 + ,112.5760649 + ,114.6044625 + ,109.9391481 + ,106.8965517 + ,103.4482759 + ,104.2596349 + ,104.8681542 + ,103.0425963 + ,100 + ,99.39148073 + ,95.13184584 + ,96.95740365 + ,107.0993915 + ,108.31643 + ,105.0709939 + ,102.6369168 + ,101.8255578 + ,104.6653144) > par7 = '0.95' > par6 = 'White Noise' > 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: > 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/1yn0r1261072212.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/2iedk1261072212.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.92959327 0.82028441 0.73632179 0.69402770 0.68972380 [7] 0.67849634 0.64460586 0.60918600 0.60727141 0.63869383 0.69154034 [13] 0.70712865 0.61460446 0.49486428 0.39475853 0.33274452 0.30616387 [19] 0.27269523 0.22395162 0.17635610 0.16429224 0.18382889 0.21607624 [25] 0.21318891 0.12249395 0.01504759 -0.06880489 -0.11876276 -0.14039306 [31] -0.16797246 -0.20433275 -0.23955298 -0.24358630 -0.22011621 -0.18304683 [37] -0.17460561 -0.24198435 -0.32534462 -0.38750989 -0.41504818 -0.41806554 [43] -0.42513259 -0.43965576 -0.45294841 -0.43831238 -0.40186982 -0.35541662 [49] -0.33112715 -0.36865561 -0.41849110 -0.44989455 -0.45546758 -0.44195307 [55] -0.42949544 -0.42477540 -0.41767331 -0.38697466 -0.33881997 -0.28208115 [61] -0.24761696 > (mypacf <- c(rpacf$acf)) [1] 0.929593270 -0.322835366 0.227816324 0.149578597 0.181248518 [6] -0.121830526 -0.002689631 0.099581208 0.252540568 0.100635177 [11] 0.212268450 -0.218739361 -0.666357871 0.125601173 -0.187576794 [16] -0.099056872 -0.064271979 -0.007077166 0.020390297 -0.081579685 [21] 0.161354484 0.001474384 -0.090393390 0.058114754 -0.118402757 [26] 0.056477518 0.049732781 -0.077803778 -0.006246059 0.012058469 [31] 0.043909979 -0.115212875 -0.056993237 0.051400850 0.044219948 [36] -0.009831688 -0.052117426 -0.063378047 -0.009053720 0.046557920 [41] -0.072225006 0.055359377 -0.052040996 0.033384552 -0.010560831 [46] -0.031000397 0.014606810 0.014414666 0.016735240 0.040236077 [51] 0.010457941 -0.072920858 -0.003129055 0.024571463 -0.050372876 [56] 0.041597385 -0.052890184 0.032994861 -0.004760141 -0.036546549 > 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/37qzp1261072212.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/41er41261072212.tab") > > try(system("convert tmp/1yn0r1261072212.ps tmp/1yn0r1261072212.png",intern=TRUE)) character(0) > try(system("convert tmp/2iedk1261072212.ps tmp/2iedk1261072212.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.587 0.318 0.766