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(310.95,312.97,315.07,315.43,315.73,315.77,315.77,315.77,313.99,314.57,314.63,314.65,314.65,314.93,315.27,316.26,316.98,317.01,317.07,317.07,317,317.08,317.04,317,317.05,321.59,325.59,326.23,326.28,326.35,326.35,326.35,326.39,326.74,326.9,326.9,326.91,336.93,348.5,349.43,349.26,349.26,349.28,349.61,349.66,349.68,349.91,349.91,350.89,355.52,356.36,357.04,360.28,360.63,360.79,360.97,361,361.01,361,361,361.58,363.19,363.61,364.14,365.51,365.51,365.5,365.5,364.59,364.63,364.54,363.67,365.22,369.05,370.45,370.46,370.46,370.58,370.58,370.22,370.21,370.29,370.29,370.2,370.2,372.55,374.51,375.58,375.75,375.75,375.75,375.69,375.76,377.5,377.51,377.74) > par5 = '12' > par4 = '0' > par3 = '0' > 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/1yxio1243952408.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/24rpu1243952408.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.974789758 0.947519679 0.921242491 0.895863533 [6] 0.870532563 0.845069357 0.819551191 0.794028887 0.767090341 [11] 0.740782373 0.714987757 0.688054212 0.657497076 0.625094395 [16] 0.591722582 0.558205090 0.525006131 0.491640160 0.458399065 [21] 0.425274571 0.391808615 0.357808770 0.323784707 0.290324346 [26] 0.255952089 0.223273990 0.192446751 0.161464108 0.129746205 [31] 0.098214246 0.067212238 0.036329897 0.006198543 -0.023526052 [36] -0.053606377 -0.084752024 -0.118002714 -0.145540202 -0.165483847 [41] -0.185036874 -0.204795993 -0.224348841 -0.243688761 -0.262613596 [46] -0.279628701 -0.296244647 -0.312438834 -0.327101967 > (mypacf <- c(rpacf$acf)) [1] 0.9747897582 -0.0541407628 0.0076493604 0.0027304629 -0.0134241279 [6] -0.0155737279 -0.0144135441 -0.0141121172 -0.0428854096 -0.0002043677 [11] -0.0069794375 -0.0392375524 -0.0865571764 -0.0508888976 -0.0410530458 [16] -0.0271362295 -0.0168159967 -0.0278836378 -0.0206355554 -0.0201203158 [21] -0.0279075538 -0.0357264678 -0.0265195137 -0.0135900063 -0.0412831981 [26] 0.0142644491 0.0121266274 -0.0290909257 -0.0381567474 -0.0208402511 [31] -0.0191444523 -0.0285710189 -0.0110074659 -0.0221176154 -0.0379261528 [36] -0.0505020737 -0.0745068779 0.0765079822 0.1092027807 -0.0254361076 [41] -0.0219475308 -0.0151541070 -0.0213277824 -0.0188713361 0.0140883698 [46] -0.0264857712 -0.0219161558 0.0161144988 > 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/3q8i01243952408.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/47kdk1243952408.tab") > > system("convert tmp/1yxio1243952408.ps tmp/1yxio1243952408.png") > system("convert tmp/24rpu1243952408.ps tmp/24rpu1243952408.png") > > > proc.time() user system elapsed 0.564 0.315 0.695