R version 2.11.1 (2010-05-31) Copyright (C) 2010 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(67.643 + ,69.371 + ,66.294 + ,70.768 + ,71.774 + ,73.388 + ,74.040 + ,73.238 + ,78.121 + ,69.825 + ,71.099 + ,70.676 + ,69.515 + ,68.246 + ,68.594 + ,70.405 + ,61.223 + ,60.542 + ,61.952 + ,68.173 + ,67.240 + ,68.739 + ,69.234 + ,65.570 + ,67.408 + ,64.630 + ,68.848 + ,73.370 + ,74.292 + ,76.525 + ,74.368 + ,75.674 + ,74.868 + ,79.824 + ,80.022 + ,79.942 + ,80.622 + ,80.079 + ,79.212 + ,80.626 + ,83.551 + ,80.407 + ,85.053 + ,86.399 + ,88.536 + ,89.008 + ,89.652 + ,88.904 + ,87.472 + ,88.631 + ,87.221 + ,88.759 + ,90.127 + ,88.709 + ,90.030 + ,88.697 + ,88.762 + ,89.475 + ,88.936 + ,90.411 + ,90.004 + ,92.725 + ,90.252 + ,93.226 + ,92.575 + ,93.125 + ,95.987 + ,97.175 + ,97.321 + ,98.577 + ,99.026 + ,101.851 + ,99.958 + ,97.875 + ,97.927 + ,95.149 + ,94.551 + ,93.999 + ,93.297 + ,89.901 + ,89.742 + ,87.096 + ,86.863 + ,86.718 + ,80.020 + ,63.483 + ,51.289 + ,44.071 + ,43.654 + ,66.115 + ,84.518 + ,83.395 + ,78.307 + ,80.049 + ,78.346 + ,78.317 + ,75.918 + ,73.739 + ,74.530 + ,74.179 + ,76.974 + ,75.408 + ,73.336 + ,69.210 + ,67.286 + ,64.606 + ,64.159 + ,64.423 + ,66.411 + ,64.270 + ,56.521 + ,50.599 + ,54.751 + ,62.227 + ,63.932 + ,65.391 + ,75.744 + ,74.590 + ,76.035 + ,74.427 + ,73.354 + ,73.081 + ,75.309 + ,75.463 + ,75.910 + ,76.151 + ,76.882 + ,78.632 + ,80.137 + ,82.490 + ,79.896 + ,81.303 + ,79.344 + ,81.355 + ,82.328 + ,79.669 + ,77.249 + ,75.101 + ,72.520 + ,72.438 + ,72.653 + ,71.429 + ,69.189 + ,66.451 + ,63.354 + ,61.379 + ,61.880 + ,62.274 + ,62.429 + ,63.905 + ,63.917 + ,64.295 + ,61.930 + ,60.440 + ,59.353 + ,58.695 + ,60.569 + ,60.386 + ,60.938 + ,61.795 + ,63.304 + ,64.270 + ,63.492 + ,61.333 + ,59.341 + ,58.412 + ,58.725 + ,59.277 + ,58.562 + ,57.858 + ,58.790 + ,58.243 + ,57.044 + ,57.339 + ,59.429 + ,60.575 + ,61.950 + ,61.712) > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '1' > par1 = 'Default' > ylab = '' > xlab = '' > main = '' > #'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/1id7q1290677821.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/rcomp/tmp/2tn7t1290677821.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.0000000 0.9516675 0.8732654 0.7922467 0.7294265 0.6861540 0.6567182 [8] 0.6320837 0.5960578 0.5638640 0.5243190 0.4868725 0.4480974 0.4099181 [15] 0.3775597 0.3512400 0.3334487 0.3147229 0.2998743 0.2774075 0.2532657 [22] 0.2373695 0.2317118 > (mypacf <- c(rpacf$acf)) [1] 0.951667473 -0.343537868 0.031518857 0.157342559 0.066407960 [6] 0.034757186 0.002842456 -0.130956226 0.154870004 -0.143475450 [11] 0.039493649 -0.054204529 -0.027783367 0.052520001 0.019512341 [16] 0.002860553 -0.008569673 0.026405931 -0.074695659 0.027702721 [21] 0.097063760 0.033956887 > 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/3wnnz1290677821.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/40nln1290677821.tab") > > try(system("convert tmp/1id7q1290677821.ps tmp/1id7q1290677821.png",intern=TRUE)) character(0) > try(system("convert tmp/2tn7t1290677821.ps tmp/2tn7t1290677821.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.750 0.290 1.004