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(0.84,0.76,0.77,0.76,0.77,0.78,0.79,0.78,0.76,0.78,0.76,0.74,0.73,0.72,0.71,0.73,0.75,0.75,0.72,0.72,0.72,0.74,0.78,0.74,0.74,0.75,0.78,0.81,0.75,0.7,0.71,0.71,0.73,0.74,0.74,0.75,0.74,0.74,0.73,0.76,0.8,0.83,0.81,0.83,0.88,0.89,0.93,0.91,0.9,0.86,0.88,0.93,0.98,0.97,1.03,1.06,1.06,1.09,1.04,1,1.04) > 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/1ily81229174431.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/2hnm61229174431.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.0000000000 0.1007178107 -0.1013907582 -0.0895020188 -0.1213548677 [6] 0.1031852849 0.1177658143 -0.0708838044 -0.0791834904 0.0666218035 [11] 0.1814715119 0.1933602512 -0.0565275908 0.0307312696 -0.0260206371 [16] -0.1029609690 -0.0224315837 0.0675190668 0.0040376851 0.0650515926 [21] 0.0688649619 -0.0323014805 0.0065051593 -0.1545536115 0.0329744280 [26] 0.0004486317 -0.1606101391 0.0087483176 0.0596680126 0.0210856886 [31] 0.2012113055 -0.0587707492 -0.1619560341 -0.0787348587 -0.0668461193 [36] 0.1475998205 -0.0201884253 -0.0668461193 -0.0421713773 -0.0255720054 [41] -0.0540601166 0.0365634814 -0.0720053836 -0.1778824585 -0.0778375953 [46] -0.0255720054 0.0549573800 0.0082996860 0.1137281292 -0.0513683266 [51] -0.0717810677 -0.0417227456 0.0132346344 -0.1101390758 -0.0605652759 [56] 0.0226558995 -0.0354419022 0.0740242261 0.0778375953 -0.0616868551 > (mypacf <- c(rpacf$acf)) [1] 0.100717811 -0.112677848 -0.068343026 -0.119025069 0.115401337 [6] 0.067992174 -0.089223174 -0.048233634 0.109535304 0.168479507 [11] 0.140937644 -0.066764465 0.152524611 0.009983725 -0.120365860 [16] -0.085005734 0.108110118 0.003970680 -0.001116558 0.021094198 [21] -0.004727915 -0.014051301 -0.230782855 0.065110984 0.029204539 [26] -0.190210600 -0.032105673 0.108689850 0.031832593 0.078095597 [31] -0.111610159 0.017199722 -0.027830181 -0.080070408 0.133549438 [36] 0.022157188 -0.013323808 -0.101858728 -0.013446514 -0.112571415 [41] -0.089399645 -0.031568567 -0.091505069 -0.095979429 -0.034978084 [46] 0.009370933 -0.048033110 0.135271932 -0.067607115 0.041443585 [51] 0.051809843 0.016957822 -0.005353058 -0.024252302 0.025737903 [56] 0.046394849 -0.011417782 0.040402879 -0.127792350 > 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/3a5nc1229174431.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/4ztz11229174431.tab") > > system("convert tmp/1ily81229174431.ps tmp/1ily81229174431.png") > system("convert tmp/2hnm61229174431.ps tmp/2hnm61229174431.png") > > > proc.time() user system elapsed 0.591 0.302 0.699