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 = '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/rcomp/tmp/1izp61229086281.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/2wr4q1229086281.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.0000000000 -0.1573434197 -0.0679524421 -0.0367948371 -0.0604515191 [6] 0.0523695926 -0.0183958483 -0.0043815268 0.0251268164 -0.1190341575 [11] -0.0237619683 -0.0523828611 0.5927263963 -0.1317948626 -0.0709359165 [16] 0.0554216289 -0.0653203508 0.0136084826 0.0289844338 -0.0708021752 [21] 0.0456022553 -0.1201174794 -0.0465589456 0.0233983406 0.4169167398 [26] -0.0921649273 -0.0260172846 -0.0186566988 -0.1072243506 -0.0041421188 [31] 0.0014328191 -0.0627511777 -0.0077596727 -0.1247803242 -0.0095678400 [36] 0.0214229876 0.3355656498 -0.0941397455 -0.0090369843 -0.0218120682 [41] -0.1476138985 0.0020717193 -0.0008512997 -0.0961924215 0.0207066031 [46] -0.1493306675 0.0326235110 -0.0262264403 0.1695114791 0.0345520604 [51] -0.0023807788 -0.0146743453 -0.1669962729 -0.0342414778 0.0228645826 [56] -0.1441391931 0.1015618508 -0.0970990914 -0.0332072877 -0.0335683884 [61] 0.1129046530 > (mypacf <- c(rpacf$acf)) [1] -0.1573434197 -0.0950628605 -0.0656650076 -0.0878985787 0.0184436433 [6] -0.0225126605 -0.0129161631 0.0187852335 -0.1149431489 -0.0695680913 [11] -0.0946135543 0.5878394179 0.0363877079 0.0100128492 0.0968479619 [16] 0.0383097006 -0.0534055411 0.0490151786 -0.0514709702 -0.0332362463 [21] 0.0009376054 -0.0657270653 -0.0140470039 0.1436218634 0.0548431592 [26] 0.0513189186 -0.0985722343 -0.1142400365 -0.0669251744 -0.1019508662 [31] -0.0439902758 -0.1122266873 -0.0712802614 0.0191289035 -0.0397572930 [36] 0.0640227447 0.0037659052 0.0082827131 -0.0071602529 -0.0775717183 [41] -0.0821181545 -0.0195219302 -0.0589803841 0.0145689132 -0.0175188183 [46] 0.0367542793 -0.0719799745 -0.1340129156 0.0890599702 0.0372116829 [51] 0.0071136302 -0.0491691626 -0.0485947359 -0.0503750556 -0.0672921099 [56] 0.0961346900 0.0703737382 -0.0554145776 -0.0836495660 -0.0174412160 > 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/3nczd1229086281.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/46ndc1229086281.tab") > > system("convert tmp/1izp61229086281.ps tmp/1izp61229086281.png") > system("convert tmp/2wr4q1229086281.ps tmp/2wr4q1229086281.png") > > > proc.time() user system elapsed 0.614 0.340 0.839