R version 2.7.0 (2008-04-22) 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(205597 + ,205471 + ,211064 + ,212856 + ,217036 + ,219302 + ,219759 + ,221388 + ,220834 + ,221788 + ,222358 + ,222972 + ,224164 + ,224915 + ,226294 + ,224690 + ,227021 + ,229284 + ,229189 + ,230032 + ,229389 + ,231053 + ,232560 + ,232681 + ,231555 + ,231428 + ,232141 + ,234939 + ,235424 + ,235471 + ,236355 + ,238693 + ,236958 + ,237060 + ,239282 + ,238252 + ,241552 + ,236230 + ,238909 + ,240723 + ,242120 + ,242100 + ,243276 + ,244677 + ,243494 + ,244902 + ,245247 + ,245578 + ,243052 + ,238121 + ,241863 + ,241203 + ,243634 + ,242351 + ,245180 + ,246126 + ,244424 + ,245166 + ,247258 + ,245094 + ,246020 + ,243082 + ,245555 + ,243685 + ,247277 + ,245029 + ,246169 + ,246778 + ,244577 + ,246048 + ,245775 + ,245328 + ,245477 + ,241903 + ,243219 + ,248088 + ,248521 + ,247389 + ,249057 + ,248916 + ,249193 + ,250768 + ,253106 + ,249829 + ,249447 + ,246755 + ,250785 + ,250140 + ,255755 + ,254671 + ,253919 + ,253741 + ,252729 + ,253810 + ,256653 + ,255231 + ,258405 + ,251061 + ,254811 + ,254895 + ,258325 + ,257608 + ,258759 + ,258621 + ,257852 + ,260560 + ,262358 + ,260812 + ,261165 + ,257164 + ,260720 + ,259581 + ,264743 + ,261845 + ,262262 + ,261631 + ,258953 + ,259966 + ,262850 + ,262204 + ,263418 + ,262752 + ,266433 + ,267722 + ,266003 + ,262971 + ,265521 + ,264676 + ,270223 + ,269508 + ,268457 + ,265814 + ,266680 + ,263018 + ,269285 + ,269829 + ,270911 + ,266844 + ,271244 + ,269907 + ,271296 + ,270157 + ,271322 + ,267179 + ,264101 + ,265518 + ,269419 + ,268714 + ,272482 + ,268351 + ,268175 + ,270674 + ,272764 + ,272599 + ,270333 + ,270846 + ,270491 + ,269160 + ,274027 + ,273784 + ,276663 + ,274525 + ,271344 + ,271115 + ,270798 + ,273911 + ,273985 + ,271917 + ,273338 + ,270601 + ,273547 + ,275363 + ,281229 + ,277793 + ,279913 + ,282500 + ,280041 + ,282166 + ,290304 + ,283519 + ,287816 + ,285226 + ,287595 + ,289741 + ,289148 + ,288301 + ,290155 + ,289648 + ,288225 + ,289351 + ,294735 + ,305333) > 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/rcomp/tmp/11gd31229371872.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/2mzjn1229371872.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.000000e+00 -2.727811e-01 -6.336135e-02 9.312441e-02 -8.132861e-02 [6] -8.385859e-02 7.564764e-02 -9.024945e-03 -1.213051e-02 -3.974115e-02 [11] 4.161522e-02 9.908021e-02 -3.845412e-01 2.120893e-01 7.819382e-02 [16] -1.389239e-01 3.272837e-02 1.975089e-01 -1.332630e-01 9.257559e-02 [21] 9.561742e-02 -8.975961e-02 -5.957775e-02 9.013445e-02 -1.136862e-02 [26] 2.344829e-02 6.938030e-04 9.699928e-02 -1.383398e-01 -9.655042e-02 [31] 1.624490e-01 -1.497829e-01 1.157605e-02 1.505156e-01 -7.529483e-02 [36] 1.574010e-03 8.715258e-04 3.632649e-03 -2.746235e-02 8.256749e-05 [41] 1.335751e-01 -1.031589e-01 -6.327756e-02 6.664287e-02 4.551947e-02 [46] -1.811492e-01 2.162634e-01 -6.537020e-02 -4.931356e-02 1.044964e-02 [51] 7.246546e-02 -1.100327e-01 3.509535e-02 6.458273e-02 -4.438160e-03 [56] 1.193429e-02 -9.160897e-02 1.505284e-01 -1.516513e-01 9.091072e-03 [61] 6.850913e-02 > (mypacf <- c(rpacf$acf)) [1] -0.272781125 -0.148846489 0.036091120 -0.056991303 -0.121619254 [6] -0.001638315 0.003743811 0.000657912 -0.070147448 0.005148229 [11] 0.128699890 -0.356728669 0.018357192 0.092581662 -0.034281644 [16] -0.078084989 0.157706785 0.047264187 0.087727565 0.119384960 [21] -0.001239939 -0.043460048 0.123062473 -0.105804616 0.128441459 [26] 0.099266348 0.082074859 -0.141269962 0.005541780 0.079412274 [31] -0.111840120 0.044492331 0.091177080 -0.108622253 0.121568997 [36] -0.139280179 0.026677787 -0.013649554 0.043067845 -0.015720718 [41] -0.074060398 0.009512577 -0.162472599 0.084267027 -0.084164159 [46] 0.071996523 0.057910551 -0.046569476 -0.009301721 -0.002563188 [51] -0.017746222 -0.007074428 -0.005584285 0.138356069 -0.014739352 [56] -0.004137250 -0.008093645 0.006926137 -0.029510709 -0.049437315 > 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/3cf3n1229371872.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/4x82v1229371872.tab") > > system("convert tmp/11gd31229371872.ps tmp/11gd31229371872.png") > system("convert tmp/2mzjn1229371872.ps tmp/2mzjn1229371872.png") > > > proc.time() user system elapsed 1.567 0.543 1.664