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(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 = '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/1yqic1229265956.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/208wq1229265956.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.289253797 0.132077828 -0.226959113 0.019413102 [6] -0.035400283 0.158978239 -0.026905455 0.109677194 -0.259881732 [11] 0.116187117 -0.173875192 0.361106478 -0.087472056 0.159423381 [16] -0.264702819 0.048724428 0.020931302 0.077749708 0.017338966 [21] 0.152027206 -0.253355061 0.086074534 -0.130370467 0.314950761 [26] -0.138781935 0.135231538 -0.176350974 0.027156642 -0.111472427 [31] 0.142302098 -0.117357854 0.123708171 -0.137856881 0.110248100 [36] -0.175222314 0.290662763 -0.197565943 0.113674100 -0.190227592 [41] 0.182751775 -0.105117631 0.046489215 -0.056636640 0.069281013 [46] -0.185035977 0.196442893 -0.211186485 0.265455769 -0.211512975 [51] 0.110483337 -0.205677933 0.150639055 0.002457064 0.014252403 [56] -0.049683616 -0.009620614 -0.061746126 0.064013758 -0.107653355 [61] 0.274548252 > (mypacf <- c(rpacf$acf)) [1] -0.289253797 0.052830258 -0.192051794 -0.109132734 -0.037047919 [6] 0.119621237 0.035387396 0.103885452 -0.178554742 0.011839616 [11] -0.103787941 0.249823814 0.078457649 0.113807254 -0.116127097 [16] -0.026225127 0.137448053 -0.010022498 0.024590160 0.118999309 [21] -0.066704581 -0.020942556 0.020890070 0.169042219 -0.059281603 [26] -0.001919640 -0.005612971 0.009616320 -0.089785215 -0.019580527 [31] -0.143430073 -0.055129301 0.020337846 0.044208201 -0.032003813 [36] 0.083515630 -0.117804111 -0.051222051 -0.052487733 0.123660954 [41] 0.026401420 -0.090229202 -0.009360346 -0.019475367 -0.041134354 [46] 0.073010183 -0.100469579 0.074233944 -0.025368825 -0.021344813 [51] -0.052071420 0.019658948 0.069423152 -0.067574238 0.086559259 [56] -0.089334430 0.065745218 -0.082361877 -0.028406978 0.043993421 > 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/3sbfj1229265956.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/4m9sr1229265956.tab") > > system("convert tmp/1yqic1229265956.ps tmp/1yqic1229265956.png") > system("convert tmp/208wq1229265956.ps tmp/208wq1229265956.png") > > > proc.time() user system elapsed 0.604 0.312 0.714