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(51772,48439,45716,43851,41622,45180,72550,77681,71177,63390,57386,56765,55772,53605,50338,47314,44596,47029,72490,78086,71058,63276,56918,55170,52980,50466,48553,46307,43796,45642,70765,75685,69220,62898,56011,54148,46626,46018,42408,42483,40113,41381,62348,63611,58389,46175,40555,37909,37866,34418,31736,29533,27604,30575,51345,52455,43367,37077,33016,33117,32279,30369,28983,27864,24591,29528,46549,47932,41584,37295,34666,36773,39591,39833) > 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/1shom1244014970.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/2lora1244014970.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.828671825 0.552091219 0.346013375 0.245057209 [6] 0.219437760 0.213434432 0.212113862 0.216848245 0.271876730 [11] 0.406221614 0.601590792 0.700405808 0.528415069 0.274575366 [16] 0.086935406 -0.011252342 -0.041967391 -0.051370166 -0.051340004 [21] -0.044012703 -0.003573400 0.096710626 0.237246999 0.298017501 [26] 0.148327215 -0.053261438 -0.195982964 -0.262791567 -0.277947517 [31] -0.272863199 -0.261367963 -0.244210023 -0.206961471 -0.131398073 [36] -0.027539200 0.010847150 -0.099353370 -0.240836346 -0.323042661 [41] -0.339907394 -0.316248799 -0.287136702 -0.272208222 -0.257313356 [46] -0.234694459 -0.177954830 -0.099701328 -0.064564580 > (mypacf <- c(rpacf$acf)) [1] 0.828671825 -0.429634480 0.187802012 0.047157973 0.067916708 [6] -0.005418515 0.075621370 0.049257352 0.236899255 0.293005173 [11] 0.384760665 -0.082424171 -0.626984594 0.182126726 -0.076343646 [16] -0.189940278 -0.084249631 -0.062473477 -0.027808364 -0.011097192 [21] -0.060569837 -0.019800716 -0.107759764 0.076079436 -0.039826909 [26] 0.057860782 -0.049613470 0.049837738 -0.047793468 0.047010011 [31] -0.079129088 0.011822281 -0.063385144 -0.055910056 -0.023751477 [36] -0.028168497 0.058404381 -0.051429238 0.082322429 0.061118245 [41] 0.053046320 -0.040017425 -0.069460932 0.031401903 -0.071533372 [46] 0.031393542 -0.061905073 0.041876871 > 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/3i0y31244014970.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/4491a1244014970.tab") > > system("convert tmp/1shom1244014970.ps tmp/1shom1244014970.png") > system("convert tmp/2lora1244014970.ps tmp/2lora1244014970.png") > > > proc.time() user system elapsed 0.583 0.323 1.029