R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(15136 + ,16733 + ,20016 + ,17708 + ,18019 + ,19227 + ,22893 + ,23739 + ,21133 + ,22591 + ,26786 + ,29740 + ,15028 + ,17977 + ,20008 + ,21354 + ,19498 + ,22125 + ,25817 + ,28779 + ,20960 + ,22254 + ,27392 + ,29945 + ,16933 + ,17892 + ,20533 + ,23569 + ,22417 + ,22084 + ,26580 + ,27454 + ,24081 + ,23451 + ,28991 + ,31386 + ,16896 + ,20045 + ,23471 + ,21747 + ,25621 + ,23859 + ,25500 + ,30998 + ,24475 + ,23145 + ,29701 + ,34365 + ,17556 + ,22077 + ,25702 + ,22214 + ,26886 + ,23191 + ,27831 + ,35406 + ,23195 + ,25110 + ,30009 + ,36242 + ,18450 + ,21845 + ,26488 + ,22394 + ,28057 + ,25451 + ,24872 + ,33424 + ,24052 + ,28449 + ,33533 + ,37351 + ,19969 + ,21701 + ,26249 + ,24493 + ,24603 + ,26485 + ,30723 + ,34569 + ,26689 + ,26157 + ,32064 + ,38870 + ,21337 + ,19419 + ,23166 + ,28286 + ,24570 + ,24001 + ,33151 + ,24878 + ,26804 + ,28967 + ,33311 + ,40226 + ,20504 + ,23060 + ,23562 + ,27562 + ,23940 + ,24584 + ,34303 + ,25517 + ,23494 + ,29095 + ,32903 + ,34379 + ,16991 + ,21109 + ,23740 + ,25552 + ,21752 + ,20294 + ,29009 + ,25500 + ,24166 + ,26960 + ,31222 + ,38641 + ,14672 + ,17543 + ,25453 + ,32683 + ,22449 + ,22316 + ,27595 + ,25451 + ,25421 + ,25288 + ,32568 + ,35110 + ,16052 + ,22146 + ,21198 + ,19543 + ,22084 + ,23816 + ,29961 + ,26773 + ,26635 + ,26972 + ,30207 + ,38687 + ,16974 + ,21697 + ,24179 + ,23757 + ,25013 + ,24019 + ,30345 + ,24488 + ,25156 + ,25650 + ,30923 + ,37240 + ,17466 + ,19463 + ,24352 + ,26805 + ,25236 + ,24735 + ,29356 + ,31234 + ,22724 + ,28496 + ,32857 + ,37198 + ,13652 + ,22784 + ,23565 + ,26323 + ,23779 + ,27549 + ,29660 + ,23356) > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > 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: > 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 (par6 == 'White Noise') par6 <- 'white' else par6 <- 'ma' > par7 <- as.numeric(par7) > 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/1yczi1272298741.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > racf <- acf(x, par1, main='Autocorrelation', xlab='time lag', ylab='ACF', ci.type=par6, ci=par7, sub=paste('(lambda=',par2,', d=',par3,', D=',par4,', CI=', par7, ', CI type=',par6,')',sep='')) > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2yczi1272298741.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.300230208 -0.312708990 -0.010389135 0.246089701 [6] 0.073339527 -0.398123648 0.104006213 0.220373444 -0.018334587 [11] -0.280444578 -0.215743781 0.799375853 -0.225459548 -0.287632440 [16] 0.005622023 0.204470011 0.083684970 -0.365819018 0.087417487 [21] 0.202006999 -0.023861762 -0.256922852 -0.171497609 0.709888703 [26] -0.201443194 -0.252724309 -0.030388989 0.245659364 0.040102176 [31] -0.346818155 0.096133015 0.197002665 -0.019335510 -0.281636956 [36] -0.113924876 0.632650130 -0.178708458 -0.222521506 -0.071305319 [41] 0.281842004 0.019302272 -0.348095566 0.111224525 0.218180005 [46] -0.077647836 -0.234654206 -0.091411908 0.562549114 > (mypacf <- c(rpacf$acf)) [1] -0.3002302082 -0.4427564255 -0.3810953328 -0.1034034419 0.0881210979 [6] -0.3071563348 -0.1687717707 -0.0676876587 -0.0470576526 -0.2439646489 [11] -0.7298507790 0.2108186027 0.0749815446 0.1191685173 0.1690089910 [16] -0.0163073185 0.0605214887 0.1071777852 0.0204389266 0.0342019493 [21] -0.0175766740 -0.0969151810 -0.1755300524 0.0527528496 0.0043541312 [26] 0.1187088821 -0.0586528019 0.1405419611 0.0318004204 0.0009825763 [31] 0.0407515770 0.0342269539 0.1101198854 -0.0161180450 -0.0569645631 [36] -0.0253722593 -0.0338224203 0.0656811637 -0.0924923915 0.0012680021 [41] -0.0265229104 -0.0712543411 -0.0338182087 0.1608205921 -0.1066596878 [46] 0.1252336848 0.0244291709 -0.0125664439 > 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/31dxo1272298741.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/45vwu1272298741.tab") > > try(system("convert tmp/1yczi1272298741.ps tmp/1yczi1272298741.png",intern=TRUE)) character(0) > try(system("convert tmp/2yczi1272298741.ps tmp/2yczi1272298741.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.571 0.296 0.828