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(6.4,6.8,7.5,7.5,7.6,7.6,7.4,7.3,7.1,6.9,6.8,7.5,7.6,7.8,8,8.1,8.2,8.3,8.2,8,7.9,7.6,7.6,8.2,8.3,8.4,8.4,8.4,8.6,8.9,8.8,8.3,7.5,7.2,7.5,8.8,9.3,9.3,8.7,8.2,8.3,8.5,8.6,8.6,8.2,8.1,8,8.6,8.7,8.8,8.5,8.4,8.5,8.7,8.7,8.6,8.5,8.3,8.1,8.2,8.1,8.1,7.9,7.9,7.9,8,8,7.9,8,7.7,7.2,7.5,7.3,7,7,7,7.2,7.3,7.1,6.8,6.6,6.2,6.2,6.8,6.9) > par5 = '12' > par4 = '0' > par3 = '0' > 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/1jdac1228913687.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/27oxp1228913687.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.864468576 0.669978963 0.512865530 0.438725490 [6] 0.451359811 0.476332879 0.451058309 0.401480582 0.364601542 [11] 0.351262585 0.351212617 0.342336917 0.241878057 0.122529540 [16] 0.019407124 -0.020265051 -0.011518083 0.003592626 -0.012625852 [21] -0.047546818 -0.073267714 -0.087758479 -0.098822615 -0.101406561 [26] -0.159133332 -0.223612579 -0.278963745 -0.297744996 -0.283771698 [31] -0.252218925 -0.227029893 -0.225222570 -0.250353165 -0.290860401 [36] -0.323333774 -0.302377637 -0.289541750 -0.268312059 -0.272162994 [41] -0.280376404 -0.290691864 -0.302907808 -0.326209907 -0.344055314 [46] -0.344335644 -0.327583608 -0.288846430 -0.220622959 -0.186493015 [51] -0.174592971 -0.200702603 -0.230195672 -0.242109266 -0.223413553 [56] -0.197979762 -0.166426989 -0.127977763 -0.096093845 -0.060884081 [61] -0.016200692 > (mypacf <- c(rpacf$acf)) [1] 0.864468576 -0.306010160 0.091656797 0.178017643 0.210168445 [6] -0.011933242 -0.098336761 0.080865084 0.102193553 0.015981810 [11] -0.027411466 -0.004619074 -0.340063243 0.020708756 -0.100506087 [16] 0.061984633 -0.097412007 -0.019687916 -0.013811300 0.035016195 [21] 0.036810359 -0.043102418 -0.015967695 0.048390102 -0.151951963 [26] 0.001002708 -0.059867090 -0.024366405 -0.044996471 0.016373664 [31] 0.061616946 -0.057640855 -0.109802873 -0.059540465 0.028598023 [36] 0.125354058 -0.103634952 0.053668199 -0.077964492 0.019512678 [41] -0.117501569 -0.115094485 -0.138428959 -0.006195468 0.018870024 [46] 0.035727232 0.086789403 0.032552053 -0.047137876 -0.023279246 [51] -0.014398934 -0.047976626 -0.046795651 -0.004554214 -0.013774761 [56] 0.031700215 0.015881982 -0.048505298 0.028828856 -0.043944600 > 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/3xta01228913687.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/445ns1228913687.tab") > > system("convert tmp/1jdac1228913687.ps tmp/1jdac1228913687.png") > system("convert tmp/27oxp1228913687.ps tmp/27oxp1228913687.png") > > > proc.time() user system elapsed 0.593 0.315 0.734