R version 2.7.0 (2008-04-22) 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(7.8,7.6,7.5,7.6,7.5,7.3,7.6,7.5,7.6,7.9,7.9,8.1,8.2,8.0,7.5,6.8,6.5,6.6,7.6,8.0,8.0,7.7,7.5,7.6,7.7,7.9,7.8,7.5,7.5,7.1,7.5,7.5,7.6,7.7,7.7,7.9,8.1,8.2,8.2,8.1,7.9,7.3,6.9,6.6,6.7,6.9,7.0,7.1,7.2,7.1,6.9,7.0,6.8,6.4,6.7,6.7,6.4,6.3,6.2,6.5,6.8,6.8,6.5,6.3,5.9,5.9,6.4,6.4) > par5 = '12' > par4 = '0' > par3 = '1' > 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/1rekp1229102267.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/2ay511229102267.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.348149488 -0.060730691 -0.318681524 -0.440417654 [6] -0.143471550 0.056012384 0.080290790 -0.069146997 -0.081714773 [11] -0.071406343 -0.014034883 0.278085772 0.063295906 0.159836911 [16] 0.094487055 -0.075146133 -0.125960066 -0.127387606 -0.020957408 [21] -0.035431534 0.049135207 -0.018389080 -0.167409853 -0.018652715 [26] -0.062228474 0.133353399 0.190903578 0.103839198 0.071910049 [31] -0.031626391 -0.111958971 -0.175164183 -0.092682513 -0.074808254 [36] 0.029626234 0.171979226 0.019801060 -0.039829744 -0.081737446 [41] 0.006820716 0.144199324 0.162162943 0.022793070 -0.195660563 [46] -0.165067371 -0.120831859 0.027597625 0.234647387 0.103588011 [51] -0.007603618 -0.022494758 -0.056419618 -0.053915310 0.004707192 [56] -0.006520181 -0.013756133 0.043615326 -0.015926118 -0.008536787 [61] 0.037605076 > (mypacf <- c(rpacf$acf)) [1] 0.348149488 -0.207032803 -0.262841463 -0.304205726 0.054868464 [6] -0.052257249 -0.147979038 -0.291026499 -0.043679644 -0.110587857 [11] -0.151799427 0.159677896 -0.274449812 0.266706876 0.015383522 [16] 0.060279018 -0.134615094 0.139615971 0.110921476 -0.045449034 [21] 0.029207059 -0.048609723 -0.096926704 -0.065986707 -0.069737028 [26] -0.091002622 -0.006477222 -0.061202855 0.094964758 -0.062403319 [31] -0.087494485 -0.032691459 -0.072809136 -0.100252169 0.107100369 [36] 0.011982356 -0.037813417 -0.144715500 0.010689780 0.082940983 [41] -0.038211841 0.037233665 -0.129474122 -0.083164085 0.016287281 [46] -0.041501381 -0.119459678 0.116375953 -0.017357424 -0.002454508 [51] 0.062512679 0.028952609 -0.010390574 -0.092761907 -0.009971202 [56] 0.001697675 -0.072274301 0.013092069 0.040289707 -0.054458137 > 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/3wqd21229102267.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/4n40u1229102267.tab") > > system("convert tmp/1rekp1229102267.ps tmp/1rekp1229102267.png") > system("convert tmp/2ay511229102267.ps tmp/2ay511229102267.png") > > > proc.time() user system elapsed 1.998 0.559 2.109