R version 2.6.0 (2007-10-03) Copyright (C) 2007 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(15082.0,14772.7,16083.0,14272.5,15223.3,14897.3,13062.6,12603.8,13629.8,14421.1,13978.3,12927.9,13429.9,13470.1,14785.8,14292.0,14308.8,14013.0,13240.9,12153.4,14289.7,15669.2,14169.5,14569.8,14469.1,14264.9,15320.9,14433.5,13691.5,14194.1,13519.2,11857.9,14615.9,15643.4,14077.2,14887.5,14159.9,14643.0,17192.5,15386.1,14287.1,17526.6,14497.0,14398.3,16629.6,16670.7,16614.8,16869.2,15663.9,16359.9,18447.7,16889.0,16505.0,18320.9,15052.1,15699.8,18135.3,16768.7,18883.0,19021.0) > 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/1l43x1197537892.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/2qeuy1197537892.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.537118423 -0.063554588 0.430093803 -0.356448847 [6] 0.062889433 0.227017470 -0.347515648 0.122178823 0.187632985 [11] -0.316539911 0.115932590 0.099451438 -0.306624409 0.171077204 [16] 0.104786870 -0.379822023 0.302913554 0.074410503 -0.297578460 [21] 0.290937967 -0.047812669 -0.153370621 0.306974851 -0.203434170 [26] -0.047841537 0.249062842 -0.227034230 0.097514861 0.074745059 [31] -0.163251035 0.084167638 -0.007150712 -0.055991361 -0.027910543 [36] 0.069432794 -0.095625539 0.054693157 0.036444452 -0.086681985 [41] 0.056840772 0.026996964 -0.083167276 0.064403384 -0.017630768 [46] 0.012671181 -0.001165841 > (mypacf <- c(rpacf$acf)) [1] -0.5371184226 -0.4947981834 0.2108684104 0.0712210878 -0.0129578807 [6] 0.1015265598 -0.1306263711 -0.2063151769 0.0575686824 0.0193804866 [11] -0.1231084953 -0.0973145792 -0.2460772774 -0.2742028820 0.0296193770 [16] -0.1656999049 -0.1534038735 0.1116567224 0.0974630303 -0.0002681513 [21] -0.0087807572 0.0285362803 0.1043636335 -0.0222858693 -0.0476149228 [26] -0.0761118238 -0.1734943309 0.0851483262 0.0595680581 0.0436363048 [31] 0.0754648573 -0.1537723846 0.0141679248 0.0466684461 0.0443801638 [36] -0.0525495763 -0.0121439375 0.0128756315 0.0450534750 -0.0525002178 [41] -0.0370713623 -0.0002840193 -0.0631217211 -0.0686926320 0.0294985934 [46] -0.1163019609 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > 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 1:par1) { + 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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/3xhkz1197537892.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-1,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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/44fnj1197537892.tab") > > system("convert tmp/1l43x1197537892.ps tmp/1l43x1197537892.png") > system("convert tmp/2qeuy1197537892.ps tmp/2qeuy1197537892.png") > > > proc.time() user system elapsed 0.859 0.312 0.971