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(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 = '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/freestat/rcomp/tmp/1i1ke1242337615.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/freestat/rcomp/tmp/2ugia1242337615.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.506176931 0.020533832 0.114736871 -0.246181084 [6] 0.230208199 -0.165454438 0.042587909 0.103505166 -0.200313263 [11] 0.212408822 -0.193787994 0.093023264 0.113157612 -0.284778025 [16] 0.223283700 -0.134962291 0.117545584 -0.009785766 -0.088467830 [21] 0.195164798 -0.215621409 0.067647224 0.053216394 -0.179253344 [26] 0.320511972 -0.300055913 0.146433163 0.060494454 -0.159230159 [31] 0.141896832 -0.147847337 0.110182528 -0.015537118 -0.114229995 [36] 0.180500666 -0.157537338 0.129762581 -0.054994392 -0.119793979 [41] 0.201724010 -0.173833002 0.070838615 0.003367023 0.028456900 [46] 0.075899506 -0.135792802 0.141885233 -0.077743087 > (mypacf <- c(rpacf$acf)) [1] -0.506176931 -0.316867481 -0.047775663 -0.277101325 -0.040854578 [6] -0.162598238 -0.113012339 -0.005318732 -0.148614554 0.006520438 [11] -0.164192718 -0.064070143 0.064289114 -0.180871058 -0.123226423 [16] -0.186731036 0.011549368 -0.089306734 -0.051128568 0.064651180 [21] -0.059700353 -0.071729638 -0.057416529 -0.166160977 0.080633983 [26] -0.120745454 0.002330794 0.025769491 0.037826012 -0.042874851 [31] -0.030089815 0.024050973 -0.038243230 -0.035095704 -0.030124663 [36] -0.065128074 0.029415381 -0.078375173 -0.087347166 -0.085389521 [41] -0.081358606 -0.165038735 -0.178833439 -0.042304006 -0.074049023 [46] -0.025544464 0.071466173 0.016377499 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #Note: the /var/www/html/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/3jvpc1242337615.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/freestat/rcomp/tmp/4z9tp1242337615.tab") > > system("convert tmp/1i1ke1242337615.ps tmp/1i1ke1242337615.png") > system("convert tmp/2ugia1242337615.ps tmp/2ugia1242337615.png") > > > proc.time() user system elapsed 0.819 0.427 0.936