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(156.3,151.5,159.1,166.9,160.5,162.8,178.9,148.5,184.1,197,186.8,139.2,162.7,187.5,235.8,219.4,212.4,220.2,197.5,185.6,232.4,223.8,219.4,191.4,210.4,212.6,274.4,256,227.6,261.7,237,234.9,310.6,274.2,288.1,242.5,271.7,282.2,317.4,280.3,322.6,328.2,280.7,288.8,347.9,360.1,348,275.7,332.6,340.8,390.5,351.2,377.4,413.5,366.9,364.8,388,429.8,423.6,326.4) > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '0.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/1pazj1229087293.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/2ds4b1229087293.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.00000000 0.88632217 0.79957159 0.74532821 0.73773106 0.70248298 [7] 0.66118874 0.60651591 0.54836609 0.47812147 0.44054531 0.43217252 [13] 0.42131233 0.32778660 0.26863956 0.21960078 0.21244064 0.19726086 [19] 0.17543063 0.12143581 0.06809809 0.01643177 -0.01905035 -0.02165957 [25] -0.03695205 -0.10634969 -0.14577665 -0.18079412 -0.19411913 -0.22348626 [31] -0.23418455 -0.25505506 -0.28753908 -0.32463005 -0.33966304 -0.32039471 [37] -0.32013158 -0.34493716 -0.36181764 -0.36996720 -0.36876733 -0.36436319 [43] -0.35644867 -0.36507314 -0.37628507 -0.38785406 -0.38601223 -0.35868722 [49] -0.34460129 > (mypacf <- c(rpacf$acf)) [1] 0.8863221660 0.0653099250 0.1173119890 0.2255438161 -0.0540143591 [6] 0.0015817472 -0.0650171136 -0.1058240595 -0.1288246820 0.0552275727 [11] 0.1222754594 0.0453582112 -0.3107023973 0.0770596415 -0.0725884228 [16] 0.0691121837 0.0820849168 -0.0265254779 -0.1141601789 -0.0556030723 [21] -0.0571213518 -0.1027045102 0.0938580359 -0.0151038345 -0.1447552984 [26] 0.0799116743 -0.0425291030 -0.0911032964 -0.0565379902 0.0809570982 [31] 0.0226646514 -0.0866969692 0.0018835257 -0.0532284657 0.0050394627 [36] 0.0253271104 0.0034114010 -0.0712669490 0.0243650944 -0.0328670839 [41] -0.0049206625 -0.0434099355 -0.0370315529 -0.0299887621 -0.0007205402 [46] 0.0014633374 -0.0006216168 -0.0060557990 > 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/3wztr1229087293.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/4djzx1229087293.tab") > > system("convert tmp/1pazj1229087293.ps tmp/1pazj1229087293.png") > system("convert tmp/2ds4b1229087293.ps tmp/2ds4b1229087293.png") > > > proc.time() user system elapsed 0.571 0.315 0.711