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 = '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: 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/1lsg11229084323.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/2vpsk1229084323.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.98561294 0.97348112 0.96174259 0.95060293 0.94038855 [7] 0.92916444 0.91831806 0.90742287 0.89593296 0.88513305 0.87403615 [13] 0.86375510 0.84499797 0.82769350 0.81090944 0.79323689 0.77706235 [19] 0.76027648 0.74340745 0.72763062 0.71076559 0.69461190 0.67880216 [25] 0.66262517 0.63940428 0.61589899 0.59317094 0.57055660 0.54971169 [31] 0.52790102 0.50731956 0.48708415 0.46711689 0.44848884 0.43017831 [37] 0.41230026 0.38898854 0.36713278 0.34820567 0.32781509 0.30966575 [43] 0.29105210 0.27319161 0.25668153 0.23938272 0.22541168 0.21146532 [49] 0.19765452 0.18076485 0.16301516 0.14803154 0.13206653 0.11764766 [55] 0.10403952 0.09130751 0.08134185 0.06922730 0.05932579 0.05012372 [61] 0.04162152 > (mypacf <- c(rpacf$acf)) [1] 0.9856129398 0.0716996967 0.0138267200 0.0177411244 0.0306675888 [6] -0.0346093776 0.0041274345 -0.0051632322 -0.0267681405 0.0134001372 [11] -0.0118347562 0.0206186718 -0.3010944224 0.0003551456 0.0005288847 [16] -0.0524077139 0.0203514403 -0.0066237254 -0.0216534891 0.0259865771 [21] -0.0251119608 -0.0038593700 0.0136491721 -0.0283473326 -0.1976785176 [26] -0.0736457997 -0.0118321684 -0.0062104313 0.0147618744 -0.0296443251 [31] 0.0367978812 -0.0207122862 0.0321657622 0.0278386161 0.0012809682 [36] 0.0214748668 -0.1043201159 0.0263745434 0.0879728682 -0.0532411168 [41] 0.0227881768 0.0095849752 -0.0073975043 0.0207432296 -0.0175222690 [46] 0.0846311377 0.0024823636 0.0039456794 -0.0124182636 -0.0539575151 [51] 0.0248766026 -0.0089227469 -0.0201512319 0.0260911943 0.0300946340 [56] 0.0534215417 -0.0588673116 0.0068897640 0.0078685057 0.0364403500 > 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/35xh51229084323.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/4o6691229084323.tab") > > system("convert tmp/1lsg11229084323.ps tmp/1lsg11229084323.png") > system("convert tmp/2vpsk1229084323.ps tmp/2vpsk1229084323.png") > > > proc.time() user system elapsed 0.619 0.311 0.715