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(267.850 + ,255.468 + ,246.717 + ,238.276 + ,229.336 + ,231.047 + ,264.440 + ,261.308 + ,257.844 + ,253.687 + ,248.286 + ,248.641 + ,243.753 + ,233.495 + ,222.356 + ,211.333 + ,202.478 + ,202.746 + ,238.802 + ,235.385 + ,224.820 + ,219.386 + ,213.106 + ,213.166 + ,208.201 + ,197.775 + ,189.191 + ,178.543 + ,171.809 + ,172.365 + ,204.140 + ,205.467 + ,193.079 + ,190.224 + ,185.553 + ,185.184 + ,183.059 + ,175.496 + ,168.120 + ,160.374 + ,155.290 + ,156.152 + ,189.784 + ,192.250 + ,184.896 + ,184.835 + ,180.172 + ,181.875 + ,182.412 + ,180.627 + ,174.303 + ,169.431 + ,163.902 + ,166.114 + ,198.414 + ,205.626 + ,199.333 + ,199.588 + ,196.569 + ,200.880 + ,201.579 + ,195.483 + ,190.617 + ,187.576 + ,183.968 + ,186.998 + ,216.617 + ,224.692 + ,222.476 + ,223.247 + ,225.618 + ,232.758 + ,235.868 + ,232.863 + ,227.564 + ,226.822 + ,223.864 + ,227.155 + ,260.300 + ,273.944 + ,270.779 + ,268.104 + ,268.703 + ,273.413 + ,275.597 + ,270.111 + ,262.272 + ,255.823 + ,250.753 + ,250.512 + ,277.888 + ,289.694 + ,281.310 + ,275.425 + ,271.287 + ,274.059 + ,274.113 + ,267.546 + ,257.622 + ,250.612 + ,243.829 + ,243.180 + ,275.362 + ,287.027 + ,279.175 + ,282.416 + ,275.424 + ,277.862 + ,284.998 + ,272.182 + ,258.613 + ,253.046 + ,243.315 + ,234.312 + ,265.912 + ,279.384 + ,262.547 + ,256.102 + ,251.133 + ,249.598 + ,251.592 + ,244.976 + ,237.527 + ,232.790 + ,224.726 + ,223.918 + ,252.637 + ,263.736 + ,251.143 + ,239.530 + ,232.401 + ,233.749 + ,232.055 + ,224.473 + ,215.866 + ,207.808 + ,199.440 + ,193.330 + ,222.787 + ,241.434 + ,221.263 + ,207.448 + ,200.241 + ,205.009 + ,206.230 + ,198.253 + ,194.660 + ,185.847 + ,180.314 + ,176.282 + ,203.541 + ,222.042 + ,197.519 + ,185.142 + ,176.355 + ,180.448 + ,180.143 + ,173.666 + ,165.687 + ,162.719 + ,157.079 + ,153.730 + ,182.698 + ,200.765 + ,176.512 + ,166.618 + ,158.644 + ,159.585 + ,163.095 + ,159.044 + ,155.511 + ,153.745 + ,150.569 + ,150.605 + ,179.612 + ,194.690 + ,189.917 + ,184.128 + ,175.335 + ,179.566 + ,181.140 + ,177.876 + ,175.041 + ,169.292 + ,166.070 + ,166.972 + ,206.348 + ,215.706 + ,202.108 + ,195.411 + ,193.111 + ,195.198 + ,198.770 + ,194.163 + ,190.420 + ,189.733 + ,186.029 + ,191.531 + ,232.571 + ,243.477 + ,227.247 + ,217.859 + ,208.679 + ,213.188 + ,216.234 + ,213.587 + ,209.465 + ,204.045 + ,200.237 + ,203.666 + ,241.476 + ,260.307 + ,243.324 + ,244.460 + ,233.575 + ,237.217 + ,235.243 + ,230.354 + ,227.184 + ,221.678 + ,217.142 + ,219.452 + ,256.446 + ,265.845 + ,248.624 + ,241.114 + ,229.245 + ,231.805 + ,219.277 + ,219.313 + ,212.610 + ,214.771 + ,211.142 + ,211.457 + ,240.048 + ,240.636 + ,230.580 + ,208.795 + ,197.922 + ,194.596 + ,194.581 + ,185.686 + ,178.106 + ,172.608 + ,167.302 + ,168.053 + ,202.300 + ,202.388 + ,182.516 + ,173.476 + ,166.444 + ,171.297) > 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/1c6b91228756676.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/2ti1b1228756676.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.0398665972 0.1185908388 0.0957189165 0.1129642892 [6] 0.0510958142 0.0458353151 0.1168145148 -0.0903869965 0.0872218340 [11] 0.0262754753 0.0308054309 -0.2643633582 0.1003883498 0.0545951088 [16] -0.1018626149 0.0571046775 -0.0286359382 0.0983363240 -0.0104171622 [21] 0.1605883620 0.0509658724 -0.0306931288 0.0874472449 -0.0855120224 [26] 0.0331168059 -0.0632656914 0.1184036030 -0.0419982240 0.0060890677 [31] -0.0981078266 -0.0135670356 -0.0058872765 -0.0282509913 0.0148193552 [36] 0.0107087785 -0.0279762566 0.0670649810 -0.0245910765 -0.0850792944 [41] -0.0325736602 0.0058761816 -0.0768828919 0.0004933836 -0.1125354734 [46] -0.0282464359 0.0071324650 -0.0755044722 -0.0219353383 -0.1534474033 [51] -0.0078380434 -0.0109516645 -0.0346673562 -0.0840457509 0.0791501514 [56] -0.0001546410 -0.0628107708 -0.1136009154 -0.1104313856 -0.1019911581 [61] -0.0060292343 > (mypacf <- c(rpacf$acf)) [1] -0.0398665972 0.1171877451 0.1061893127 0.1103302003 0.0402238926 [6] 0.0160710760 0.0914691515 -0.1108304149 0.0402874531 0.0262345523 [11] 0.0151593314 -0.2846859360 0.0604653226 0.1158062350 -0.0623739283 [16] 0.0472738043 0.0010478804 0.1154364818 0.0435917996 0.0799699674 [21] 0.0958145283 -0.0492261274 -0.0003089217 -0.2176172652 0.0185689674 [26] -0.0135079544 0.0371542275 0.0240043891 -0.0073503000 -0.0857522813 [31] 0.0001524974 0.0561315625 0.0659424813 -0.0370658850 0.0978051915 [36] -0.1497755573 0.1075813539 -0.0757445940 -0.1096240188 -0.0513859443 [41] -0.0500851705 -0.0957382217 0.0450749583 -0.0488182272 0.0338672517 [46] 0.0396718307 0.0044633467 -0.0911528823 -0.0249569507 -0.0222480955 [51] 0.0336971252 -0.0212496840 -0.0898765731 0.0494438202 0.0363358626 [56] -0.1272175393 -0.1438534262 -0.0966816137 -0.0595785055 0.0200860583 > 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/3tp3b1228756676.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/431d01228756676.tab") > > system("convert tmp/1c6b91228756676.ps tmp/1c6b91228756676.png") > system("convert tmp/2ti1b1228756676.ps tmp/2ti1b1228756676.png") > > > proc.time() user system elapsed 0.836 0.412 0.917