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(46402 + ,45329 + ,42185 + ,49341 + ,50472 + ,33020 + ,29567 + ,22870 + ,25730 + ,32609 + ,23536 + ,15135 + ,36776 + ,29982 + ,38062 + ,34226 + ,24906 + ,30233 + ,27405 + ,20784 + ,22886 + ,25425 + ,20838 + ,15655 + ,37158 + ,36364 + ,43213 + ,31635 + ,30113 + ,29985 + ,20919 + ,19429 + ,21427 + ,26064 + ,20109 + ,15369 + ,35466 + ,25954 + ,33504 + ,28115 + ,28501 + ,28618 + ,21434 + ,20177 + ,21484 + ,25642 + ,23515 + ,12941 + ,36190 + ,37785 + ,38407 + ,33326 + ,30304 + ,27576 + ,27048 + ,17291 + ,21018 + ,26792 + ,19426 + ,13927 + ,35647 + ,31746 + ,31277 + ,31583 + ,25607 + ,28151 + ,24947 + ,18077 + ,23429 + ,26313 + ,18862 + ,14753 + ,36409 + ,33163 + ,34122 + ,35225 + ,28249 + ,30374 + ,26311 + ,22069 + ,23651 + ,28628 + ,23187 + ,14727 + ,43080 + ,32519 + ,39657 + ,33614 + ,28671 + ,34243 + ,27336 + ,22916 + ,24537 + ,26128 + ,22602 + ,15744 + ,41086 + ,39690 + ,43129 + ,37863 + ,35953 + ,29133 + ,24693 + ,22205 + ,21725 + ,27192 + ,21790 + ,13253 + ,37702 + ,30364 + ,32609 + ,30212 + ,29965 + ,28352 + ,25814 + ,22414 + ,20506 + ,28806 + ,22228 + ,13971 + ,36845 + ,35338 + ,35022 + ,34777 + ,26887 + ,23970 + ,22780 + ,17351 + ,21382 + ,24561 + ,17409 + ,11514 + ,31514 + ,27071 + ,29462 + ,26105 + ,22397 + ,23843 + ,21705 + ,18089 + ,20764 + ,25316 + ,17704 + ,15548 + ,28029 + ,29383 + ,36438 + ,32034 + ,22679 + ,24319 + ,18004 + ,17537 + ,20366 + ,22782 + ,19169 + ,13807 + ,29743 + ,25591 + ,29096 + ,26482 + ,22405 + ,27044 + ,17970 + ,18730 + ,19684 + ,19785 + ,18479 + ,10698 + ,31956 + ,29506 + ,34506 + ,27165 + ,26736 + ,23691 + ,18157 + ,17328 + ,18205 + ,20995 + ,17382 + ,9367 + ,31124 + ,26551 + ,30651 + ,25859 + ,25100 + ,25778 + ,20418 + ,18688 + ,20424 + ,24776 + ,19814 + ,12738) > par5 = '12' > par4 = '1' > par3 = '0' > par2 = '1' > par1 = '48' > #'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/1b31s1230108990.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/2u7nd1230108990.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 5.036066e-01 3.556350e-01 3.257683e-01 9.384557e-02 [6] 1.225015e-01 9.606055e-02 3.666843e-02 9.492115e-02 -4.246348e-02 [11] -1.956264e-01 -2.130103e-01 -4.112393e-01 -2.910271e-01 -5.182518e-02 [16] -1.120402e-02 3.820391e-02 6.682415e-02 6.742389e-02 3.606392e-03 [21] 1.779571e-02 1.487512e-01 1.804935e-01 2.859479e-01 2.838618e-01 [26] 2.498912e-01 1.543539e-01 -1.649738e-02 -2.919991e-02 -1.727009e-02 [31] -8.932355e-02 -2.012806e-02 4.552551e-05 -1.732555e-01 -1.871843e-01 [36] -2.073566e-01 -3.448680e-01 -2.137256e-01 -2.004349e-01 -8.680733e-02 [41] 4.953286e-02 -4.078621e-02 7.405302e-03 2.970866e-02 -4.993759e-02 [46] 1.856234e-02 1.534405e-01 1.033178e-01 2.073121e-01 > (mypacf <- c(rpacf$acf)) [1] 0.503606562 0.136680213 0.139690560 -0.193454454 0.102096531 [6] -0.003245389 0.009605320 0.047229308 -0.154470489 -0.212607205 [11] -0.094319201 -0.271638034 0.114400347 0.275301575 0.185060081 [16] -0.048934421 -0.012868460 0.079096077 -0.105629738 0.036799419 [21] 0.177051940 -0.070449489 0.083191021 -0.063981324 0.086637197 [26] 0.020835755 -0.054640067 -0.041736667 -0.065430603 -0.065325460 [31] 0.015223638 0.016410611 -0.056708524 -0.045671503 0.061655516 [36] -0.236761022 0.078989317 -0.070593820 0.052016383 0.057089297 [41] -0.025345175 0.005799632 -0.014361499 -0.024219628 -0.043790708 [46] 0.044905489 0.012316066 0.003128412 > 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/3jxxm1230108990.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/4zvha1230108990.tab") > > system("convert tmp/1b31s1230108990.ps tmp/1b31s1230108990.png") > system("convert tmp/2u7nd1230108990.ps tmp/2u7nd1230108990.png") > > > proc.time() user system elapsed 0.576 0.324 0.686