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 = '1' > 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/1ug7d1230109192.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/2ed8z1230109192.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.375363505 -0.094601839 0.181913007 -0.297114369 [6] 0.115951635 0.035904406 -0.117172511 0.200272843 0.007934128 [11] -0.129974614 0.193296616 -0.329707309 -0.107618833 0.199766642 [16] -0.026283372 0.042130412 0.012668920 0.054530282 -0.076846853 [21] -0.116885350 0.102423180 -0.078295642 0.114593949 0.035831401 [26] 0.037596244 0.082525313 -0.150486314 -0.022889070 0.089096596 [31] -0.144868056 0.055052044 0.205182323 -0.164119933 0.012326855 [36] 0.099324286 -0.265846942 0.147658487 -0.117251362 -0.025274677 [41] 0.226054499 -0.147185791 0.039317821 0.083324506 -0.154239636 [46] -0.065995984 0.183374956 -0.139201108 0.126154093 > (mypacf <- c(rpacf$acf)) [1] -0.3753635054 -0.2741229030 0.0425061016 -0.2777500295 -0.0993011797 [6] -0.0734124390 -0.1018269369 0.0678760271 0.1372768597 -0.0034866870 [11] 0.1677334270 -0.2219879639 -0.3640205580 -0.2597890127 -0.0452747562 [16] -0.1006096721 -0.1490909577 0.1256051408 0.0235859120 -0.1433530085 [21] 0.1031748005 -0.0565129810 0.0564254822 -0.0493071671 -0.0253608485 [26] 0.0395579880 0.0452127301 0.0455837170 0.0648584334 -0.0014291540 [31] -0.0208337227 0.0455807990 0.0269558369 -0.0809902459 0.1911566499 [36] -0.0784553209 0.0494774281 -0.0557539441 -0.0805238847 -0.0329885750 [41] -0.0195650313 -0.0207077204 0.0204043997 0.0790824142 -0.0559246110 [46] -0.0054369652 -0.0005782624 -0.0152331621 > 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/3g0xa1230109192.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/4v2281230109192.tab") > > system("convert tmp/1ug7d1230109192.ps tmp/1ug7d1230109192.png") > system("convert tmp/2ed8z1230109192.ps tmp/2ed8z1230109192.png") > > > proc.time() user system elapsed 0.584 0.313 0.690