R version 2.8.0 (2008-10-20) 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(51.220 + ,50.487 + ,49.415 + ,49.398 + ,48.196 + ,47.348 + ,49.331 + ,49.644 + ,49.588 + ,49.567 + ,49.010 + ,49.563 + ,49.741 + ,49.487 + ,48.278 + ,47.478 + ,46.985 + ,45.216 + ,46.581 + ,49.266 + ,48.121 + ,46.412 + ,46.285 + ,46.824 + ,46.949 + ,45.355 + ,44.924 + ,45.059 + ,44.202 + ,44.149 + ,46.151 + ,47.703 + ,48.436 + ,47.089 + ,47.492 + ,49.295 + ,49.127 + ,50.041 + ,48.857 + ,48.428 + ,48.788 + ,48.820 + ,50.743 + ,52.590 + ,51.959 + ,53.451 + ,55.674 + ,56.120 + ,55.685 + ,56.714 + ,54.882 + ,55.173 + ,53.574 + ,53.954 + ,58.055 + ,61.062 + ,58.353 + ,59.693 + ,58.833 + ,60.417 + ,61.696 + ,62.515 + ,62.687 + ,61.794 + ,63.014 + ,63.134 + ,68.057 + ,67.327 + ,68.310 + ,69.780 + ,69.944 + ,69.881 + ,71.397 + ,70.631 + ,70.452 + ,69.862 + ,69.114 + ,69.358 + ,71.133 + ,73.128 + ,73.528 + ,73.677 + ,72.273 + ,71.962 + ,73.654 + ,73.305 + ,73.355 + ,73.346 + ,72.881 + ,72.424 + ,74.540 + ,74.847 + ,75.904 + ,76.870 + ,76.370 + ,77.631 + ,78.335 + ,77.926 + ,77.236 + ,76.755 + ,74.710 + ,73.486 + ,76.034 + ,76.389 + ,77.767 + ,78.124 + ,76.696 + ,77.375 + ,77.431 + ,77.347 + ,77.013 + ,76.666 + ,75.225 + ,75.579 + ,77.100 + ,78.592 + ,79.502 + ,78.528 + ,77.775 + ,77.271 + ,78.738 + ,77.885 + ,76.896 + ,75.813 + ,74.958 + ,75.340 + ,77.187 + ,78.602 + ,81.653 + ,78.125 + ,76.092 + ,74.870 + ,75.615 + ,74.776 + ,72.528 + ,71.894 + ,71.641 + ,71.145 + ,73.320 + ,72.186 + ,72.854 + ,74.243 + ,74.628 + ,72.368 + ,75.361 + ,72.746 + ,70.536 + ,69.410 + ,66.219 + ,66.739 + ,67.626 + ,70.602 + ,71.758 + ,71.786 + ,69.641 + ,68.055 + ,70.148 + ,69.390 + ,68.562 + ,68.622 + ,68.120 + ,68.308 + ,70.421 + ,69.766 + ,72.157 + ,72.928 + ,75.340 + ,74.812 + ,74.593 + ,76.003 + ,75.112 + ,75.452 + ,75.634 + ,75.653 + ,78.645 + ,73.100 + ,79.699 + ,82.848 + ,81.834 + ,81.736 + ,82.267 + ,84.120 + ,83.819 + ,82.734 + ,81.842 + ,81.735 + ,83.227 + ,81.934 + ,89.521 + ,88.827 + ,85.874 + ,85.211 + ,87.130 + ,88.620 + ,89.563 + ,89.056 + ,88.542 + ,89.504 + ,89.428 + ,86.040 + ,96.240 + ,94.423 + ,93.028 + ,92.285 + ,91.685 + ,94.260 + ,93.858 + ,92.437 + ,92.980 + ,92.099 + ,92.803 + ,88.551 + ,98.334 + ,98.329 + ,96.455 + ,97.109 + ,97.687 + ,98.512 + ,98.673 + ,96.028 + ,98.014 + ,95.580 + ,97.838 + ,97.760 + ,99.913 + ,97.588 + ,93.942 + ,93.656 + ,93.365 + ,92.881 + ,93.120 + ,91.063 + ,90.930 + ,91.946 + ,94.624 + ,95.484 + ,95.862 + ,95.530 + ,94.574 + ,94.677 + ,93.845 + ,91.533 + ,91.214 + ,90.922 + ,89.563 + ,89.945 + ,91.850 + ,92.505 + ,92.437 + ,93.876) > par5 = '12' > par4 = '1' > 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/freestat/rcomp/tmp/1gwrh1229086474.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/freestat/rcomp/tmp/2bm9m1229086474.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.179794599 -0.052791145 -0.028774288 -0.105817601 [6] 0.131932173 -0.054873675 0.008818990 0.095802653 -0.084068498 [11] 0.081343001 0.044477423 -0.287959195 -0.037384939 -0.057461579 [16] 0.209131105 0.030887081 -0.038894894 0.090417248 -0.105257470 [21] 0.087649972 0.009301233 -0.077048807 0.095743561 -0.098032602 [26] 0.078757670 0.049846541 -0.076552047 0.033711232 -0.011380446 [31] -0.037480574 0.055199809 -0.088465471 0.013183233 -0.037510386 [36] 0.069751955 0.123760120 -0.193866499 0.022976229 -0.016806997 [41] -0.045736455 0.070032916 -0.034261271 0.022103847 -0.051934455 [46] -0.092548188 0.150970037 -0.049164026 -0.154703685 0.111165985 [51] -0.019513087 0.073021478 -0.038695891 -0.015960879 0.030241707 [56] -0.142208413 0.187691576 0.005050411 -0.015566521 -0.020685383 [61] -0.161423130 > (mypacf <- c(rpacf$acf)) [1] -0.179794599 -0.087960668 -0.057192601 -0.132812757 0.083347403 [6] -0.035623649 -0.001465298 0.095578405 -0.031113005 0.061016216 [11] 0.088554636 -0.266931652 -0.170822242 -0.120358796 0.136858101 [16] 0.026028061 0.056140731 0.114205911 -0.019459301 0.115259210 [21] 0.044245209 -0.047140800 0.057313897 -0.135817790 -0.073299024 [26] -0.044404914 0.054344700 0.051296167 0.105671555 0.027032991 [31] 0.014597174 -0.012330561 -0.050069443 -0.111742708 0.052705909 [36] 0.065814906 -0.168910227 -0.060876446 0.039476920 -0.037276154 [41] 0.056122004 0.066834052 -0.031786207 -0.119786771 -0.131883514 [46] -0.011689673 0.041806231 -0.080582062 0.016313382 -0.023428023 [51] 0.018860355 0.018576024 0.078475394 0.036091719 -0.123260036 [56] 0.071370117 -0.039360949 0.008528746 0.035085188 -0.159498751 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #Note: the /var/www/html/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/3fwbn1229086474.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/freestat/rcomp/tmp/4pob31229086474.tab") > > system("convert tmp/1gwrh1229086474.ps tmp/1gwrh1229086474.png") > system("convert tmp/2bm9m1229086474.ps tmp/2bm9m1229086474.png") > > > proc.time() user system elapsed 0.841 0.430 0.986