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(374 + ,572 + ,402 + ,589 + ,507 + ,628 + ,698 + ,451 + ,694 + ,0 + ,488 + ,526 + ,343 + ,494 + ,447 + ,0 + ,470 + ,366 + ,517 + ,483 + ,485 + ,530 + ,308 + ,481 + ,437 + ,468 + ,502 + ,408 + ,479 + ,436 + ,410 + ,451 + ,344 + ,411 + ,0 + ,427 + ,454 + ,365 + ,499 + ,416 + ,430 + ,470 + ,325 + ,452 + ,442 + ,488 + ,446 + ,523 + ,594 + ,439 + ,588 + ,503 + ,444 + ,525 + ,375 + ,472 + ,436 + ,458 + ,514 + ,0 + ,472 + ,360 + ,450 + ,549 + ,361 + ,466 + ,387 + ,457 + ,470 + ,396 + ,471 + ,422 + ,404 + ,414 + ,342 + ,459 + ,379 + ,0 + ,410 + ,319 + ,411 + ,371 + ,365 + ,429 + ,333 + ,392 + ,469 + ,432 + ,534 + ,379 + ,436 + ,448 + ,358 + ,492 + ,387 + ,529 + ,475 + ,439 + ,459 + ,361 + ,0 + ,0 + ,394 + ,425 + ,341 + ,455 + ,403 + ,471 + ,523 + ,389 + ,531 + ,468 + ,398 + ,446 + ,355 + ,435 + ,353 + ,0 + ,400 + ,332 + ,389 + ,355 + ,384 + ,406 + ,356 + ,336 + ,351 + ,278 + ,265 + ,229 + ,387 + ,435 + ,317 + ,490 + ,472 + ,440 + ,429 + ,350 + ,489 + ,494 + ,436 + ,436 + ,375 + ,429 + ,0 + ,434 + ,472 + ,362 + ,440 + ,433 + ,400 + ,442 + ,316 + ,432 + ,401 + ,434 + ,488 + ,377 + ,484 + ,377 + ,0 + ,0 + ,300 + ,389 + ,337 + ,376 + ,377 + ,331 + ,339 + ,356 + ,280 + ,249 + ,196 + ,268 + ,379 + ,401 + ,404 + ,397 + ,419 + ,421 + ,407 + ,296 + ,468 + ,475 + ,422 + ,456 + ,339 + ,446 + ,419 + ,346 + ,327 + ,326 + ,403 + ,359 + ,358 + ,421 + ,322 + ,367 + ,394 + ,356 + ,418 + ,344 + ,372 + ,358 + ,373 + ,379 + ,0 + ,348 + ,369 + ,341 + ,390 + ,279 + ,325 + ,354 + ,346 + ,358 + ,296 + ,356 + ,337 + ,360 + ,474 + ,362 + ,440 + ,443 + ,435 + ,429 + ,341 + ,434 + ,329 + ,416 + ,430 + ,307 + ,408 + ,322 + ,0 + ,324 + ,303 + ,369 + ,328 + ,258 + ,372 + ,298 + ,376 + ,306 + ,359 + ,418 + ,311 + ,355 + ,335 + ,345 + ,318 + ,291 + ,340 + ,0 + ,356 + ,419 + ,296 + ,361 + ,371 + ,392 + ,383 + ,286 + ,362 + ,358) > par5 = '12' > par4 = '0' > 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/1gjft1242337338.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/2hf0g1242337338.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.183744143 0.194284992 0.170295842 -0.039773472 [6] 0.151838208 -0.032145262 0.054055213 0.069595837 -0.082271501 [11] 0.090495097 -0.084699343 0.058977535 0.049960267 -0.143161454 [16] 0.128624841 0.034661980 0.162419687 0.097706517 0.050147341 [21] 0.146474167 -0.076146138 0.053816779 0.072192335 0.004705303 [26] 0.228868794 -0.069552718 0.122192762 0.074181947 -0.072231955 [31] 0.038805322 -0.079526649 0.044203341 -0.012937605 -0.043647961 [36] 0.110886554 -0.028676571 0.089738492 -0.004571008 -0.008115259 [41] 0.183697752 0.046332687 0.192801886 0.222684813 0.248225186 [46] 0.226464907 0.080770687 0.156752066 0.000907391 > (mypacf <- c(rpacf$acf)) [1] 0.183744143 0.166132016 0.117076984 -0.121785579 0.137884768 [6] -0.075713083 0.056832630 0.023992681 -0.080397171 0.067655345 [11] -0.085087312 0.093036716 0.003976333 -0.128555943 0.120721677 [16] 0.075190110 0.149664827 -0.043410847 0.059546667 0.024379983 [21] -0.093108680 0.029890209 0.045210365 0.032528710 0.144198266 [26] -0.100420301 0.101948714 -0.018654207 -0.044384239 -0.059705305 [31] 0.021524254 0.009878702 -0.043428900 0.017976906 0.016707999 [36] 0.012102574 0.048413886 -0.044725917 0.062769414 0.074639795 [41] 0.074333676 0.072224745 0.157091849 0.170806997 0.034982497 [46] 0.066258280 0.018254230 -0.078962719 > 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/3114k1242337338.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/459yd1242337338.tab") > > system("convert tmp/1gjft1242337338.ps tmp/1gjft1242337338.png") > system("convert tmp/2hf0g1242337338.ps tmp/2hf0g1242337338.png") > > > proc.time() user system elapsed 0.605 0.332 3.196