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(0.8800,1.0300,0.6900,0.7100,1.1100,1.0500,1.0300,0.6500,0.5900,0.7700,0.9000,1.2600,0.9600,0.8300,0.8700,0.7900,1.1200,0.8800,0.6400,0.6400,0.5800,0.5000,0.9900,1.0700,0.8900,0.8900,0.8300,0.8600,0.9000,1.1200,0.8800,0.8800,0.8900,0.8200,0.8800,0.8100,0.8800,0.7600,1.1300,0.8500,1.4500,1.5500,0.7100,0.8100,0.8300,0.7300,0.9000,0.9400,1.7800,0.8800,1.0400,0.8300,1.4100,0.9600,1.3000,0.8300,1.4000,0.9100,0.8700,0.9700,1.1900,1.2300,1.3300,1.1700,1.0900,0.6300,0.8900,0.6300,1.5100,0.9700,0.8400,0.9200,0.9500,0.7300,1.0200,0.7900,1.2700,0.9500,0.7500,0.5200,0.9500,0.8200,0.7600,1.2400,0.9400,1.0400,1.8100,0.9500,1.3900,0.8600,1.1500,1.5100,0.6000,0.7200,1.1000,1.6200,1.8400,1.7300,1.3600,1.0700,1.0000,1.4900,0.9000,1.4300,1.5400,0.8100,1.6100,1.3000,1.4000,1.0300,0.7900,1.1100,1.1500,1.0300,1.5900,1.1100,1.3300,0.9300,1.0700,1.1400,1.1200,0.8600,0.8200,1.0200,1.0700,1.3100,0.9800,0.8900,0.8000,0.8000,0.7800,0.9700) > 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/1sb9x1250601150.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/2b29i1250601150.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.478094346 0.102476451 -0.124430134 -0.082956109 [6] 0.060209926 0.037320441 -0.091143152 0.210038761 -0.245355272 [11] 0.173739081 -0.130342248 0.171800197 -0.044009366 -0.084705604 [16] 0.041871993 0.017304500 -0.144716992 0.248578081 -0.259091282 [21] 0.216891722 -0.103943214 -0.016608380 0.059057360 -0.006139460 [26] -0.017324185 -0.042799811 -0.067864571 0.185679210 -0.097159410 [31] 0.124955904 -0.178281480 0.097229825 -0.116676630 0.052733995 [36] 0.042054903 0.016803008 -0.043540223 0.057121899 -0.083692892 [41] 0.150648227 -0.194275202 0.048412802 0.088232744 -0.111178697 [46] 0.082070759 -0.049222961 0.016604531 0.077610773 -0.118013189 [51] 0.103572666 -0.053625277 0.037344930 -0.052860943 -0.039940492 [56] 0.034703414 0.034929072 -0.002057477 0.056301860 -0.102930896 [61] 0.102190201 > (mypacf <- c(rpacf$acf)) [1] -0.478094346 -0.163460638 -0.193893399 -0.305858559 -0.222140430 [6] -0.116142207 -0.264417627 -0.003068173 -0.214301219 -0.105653624 [11] -0.180023448 0.049094878 0.084533164 -0.040525063 0.062097328 [16] 0.133453874 -0.061131476 0.149098661 -0.036864794 0.024542290 [21] 0.031371788 -0.041176990 -0.033554416 -0.003308990 0.018081197 [26] -0.180383728 -0.192740824 -0.074676112 -0.030209982 0.042145726 [31] -0.102199814 0.064027883 -0.125748890 -0.079672808 0.005688987 [36] -0.121089059 -0.037837190 -0.013457174 0.022790710 0.123347657 [41] -0.053330534 -0.121459983 0.098738557 -0.050450609 -0.019979888 [46] -0.057198377 -0.022708825 -0.032357522 -0.016286395 -0.048643781 [51] 0.028505765 0.071483207 -0.019784651 0.057197640 -0.084540267 [56] 0.033529784 0.069557991 -0.049725078 -0.021519178 0.058513260 > 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/3h6hg1250601150.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/4zxa91250601150.tab") > > system("convert tmp/1sb9x1250601150.ps tmp/1sb9x1250601150.png") > system("convert tmp/2b29i1250601150.ps tmp/2b29i1250601150.png") > > > proc.time() user system elapsed 0.587 0.304 0.814