R version 2.6.1 (2007-11-26) 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(36429,32720,34490,34749,30945,34302,30400,25543,32188,34395,27148,26634,34257,34794,38927,38512,33325,40658,32719,29323,34384,35153,30937,28079,39703,35245,41324,40802,37732,41527,33441,32885,36804,35593,34355,27045,45587,40370,48209,40275,36760,42588,35365,33014,36944,35649,34814,26041,45636,40040,47725,40263,43339,47283,40492,35768,28539,42971,36144,26950) > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '1' > par1 = '60' > #'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/1sixd1197972171.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/2u6te1197972171.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.0000000000 0.2932916448 0.2360968666 0.2016850939 0.1456533348 [6] 0.0255731031 -0.2544374266 -0.0570156688 -0.0623098607 0.1036986113 [11] 0.0579959301 0.0792769349 0.5711074662 0.1426491494 0.1273106134 [16] 0.0484169384 0.0744846858 -0.0474838808 -0.2639001461 -0.0875956837 [21] -0.1405438087 0.0343027507 -0.0528467547 -0.0233941935 0.2845094073 [26] 0.0300549632 -0.0323560890 -0.0860416984 -0.0386712271 -0.1213183470 [31] -0.2559686075 -0.1587926487 -0.1922132647 -0.0438659600 -0.1122092229 [36] -0.0795878890 0.1118069035 0.0083743880 -0.0637818492 -0.0654375342 [41] 0.0005560862 -0.1119987433 -0.1850896564 -0.1244424534 -0.1363577248 [46] -0.0822406660 -0.1185799261 -0.1276717259 -0.0057670808 0.0083143318 [51] -0.0399094847 -0.0203130061 0.0427257964 0.0079286914 0.0104819787 [56] 0.0318433009 -0.0083370218 0.0086623097 0.0159167612 -0.0022387915 > (mypacf <- c(rpacf$acf)) [1] 0.293291645 0.164201488 0.107553250 0.040598716 -0.078297396 [6] -0.336233628 0.060196307 0.052172903 0.271117585 0.092327710 [11] -0.006848385 0.507326739 -0.285462951 -0.147159154 -0.087108296 [16] -0.066631783 0.008553531 0.040995143 0.070663387 0.020840672 [21] -0.055981599 -0.076024506 -0.049075120 -0.072248008 -0.019388448 [26] -0.143798761 0.036814923 -0.054143310 0.031283270 0.059390134 [31] -0.109529932 -0.059669627 -0.101302746 -0.064677935 0.032518903 [36] 0.009009574 0.088619199 0.017585705 0.018822776 0.045331606 [41] -0.168625633 -0.057255813 -0.025002272 -0.019450537 0.008554067 [46] 0.006102156 -0.051643338 -0.046120140 0.008770952 0.087819039 [51] 0.001391928 -0.033789528 0.042018441 0.075075434 0.073930958 [56] -0.055274033 0.033817012 0.013785280 0.034177727 > 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/3840m1197972172.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/4w6z91197972172.tab") > > system("convert tmp/1sixd1197972171.ps tmp/1sixd1197972171.png") > system("convert tmp/2u6te1197972171.ps tmp/2u6te1197972171.png") > > > proc.time() user system elapsed 1.578 0.556 1.677