R version 2.6.1 (2007-11-26) Copyright (C) 2007 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(527,516,503,489,479,475,524,552,532,511,492,492,493,481,462,457,442,439,488,521,501,485,464,460,467,460,448,443,436,431,484,510,513,503,471,471,476,475,470,461,455,456,517,525,523,519,509,512,519,517,510,509,501,507,569,580,578,565,547,555,562,561,555,544,537,543,594,611,613,611,594,595,591,589,584,573,567,569,621,629,628,612,595,597,593,590,580,574,573,573,620,626) > 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/1lwxg1197646842.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/2jlhm1197646842.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.920601002 0.806632531 0.731444546 0.695904052 [6] 0.697965109 0.694522649 0.668122804 0.636394595 0.636928289 [11] 0.671022072 0.720555874 0.731278298 0.639256426 0.519423805 [16] 0.433756488 0.383577912 0.367021131 0.345727796 0.305938113 [21] 0.262197768 0.246087935 0.258665019 0.284259263 0.277624819 [26] 0.187449645 0.081446366 0.005744365 -0.039274119 -0.055267263 [31] -0.076398650 -0.112649402 -0.151339302 -0.162377880 -0.143408064 [36] -0.114659172 -0.118739741 -0.192116723 -0.274928238 -0.324284188 [41] -0.348685912 -0.353166369 -0.358629399 -0.376169035 -0.394656509 [46] -0.389127352 -0.360762941 -0.322900132 -0.311410546 -0.354623309 [51] -0.405830718 -0.426962426 -0.427470490 -0.412682115 -0.400180663 [56] -0.395673176 -0.392352429 -0.370879360 -0.332241824 -0.295129331 [61] -0.281177548 > (mypacf <- c(rpacf$acf)) [1] 0.920601002 -0.268035002 0.258388789 0.098643395 0.228404993 [6] -0.067139068 0.017636189 0.040778559 0.251422288 0.131911896 [11] 0.196021357 -0.163047710 -0.522404250 -0.084410030 -0.131475196 [16] -0.127319824 -0.054512426 -0.087075741 -0.013650336 -0.073031856 [21] 0.009443794 -0.022431877 0.126321394 0.029396821 -0.115229625 [26] 0.099336741 -0.053218105 -0.003872385 -0.041481866 -0.036418011 [31] -0.016727058 -0.055351353 0.028058862 0.019263754 0.057427793 [36] -0.039226028 -0.035044967 0.030090361 0.044644984 -0.036491062 [41] -0.042123789 0.059878903 -0.016434343 -0.010691630 -0.035053613 [46] -0.046919610 0.060994972 0.001230008 0.034771992 -0.022586490 [51] 0.072121857 -0.022809759 0.022202952 -0.013606177 0.047559356 [56] -0.005290588 -0.018282260 -0.038606392 -0.118361853 -0.035582937 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > 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 1:par1) { + 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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/3dift1197646842.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-1,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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/4ipnu1197646842.tab") > > system("convert tmp/1lwxg1197646842.ps tmp/1lwxg1197646842.png") > system("convert tmp/2jlhm1197646842.ps tmp/2jlhm1197646842.png") > > > proc.time() user system elapsed 2.633 0.925 3.131