R version 2.6.0 (2007-10-03) 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(2.25,1.85,1.75,1.75,1.55,1.5,1.5,1.1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.21,1.25,1.25,1.45,1.5,1.5,1.64,1.75,1.93,2,2.17,2.25,2.39,2.5,2.5,2.65,2.75,2.75,2.9,3,3,3,3) > par5 = '12' > par4 = '1' > par3 = '2' > 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/1q27z1197319943.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/2zofz1197319943.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.00000000 -0.37977709 -0.26414501 0.44263809 -0.23066516 -0.12133669 [7] 0.10451131 0.04413001 0.11088294 -0.16007238 0.12027624 0.02587580 [13] -0.14689042 0.12409404 -0.07530471 0.00751390 0.01290613 -0.14520354 [19] 0.25618813 -0.11923297 -0.18918786 0.32598290 -0.19235989 -0.19133561 [25] 0.23631162 -0.08784891 -0.03783479 0.01015093 0.09231734 -0.03158770 [31] -0.18144015 0.14708456 -0.01327190 -0.16436593 0.17845633 -0.01082433 [37] -0.04838759 0.10796515 -0.14083331 0.08032961 -0.01624583 -0.07265708 [43] 0.07437935 0.02201892 -0.03788070 0.03467622 > (mypacf <- c(rpacf$acf)) [1] -0.3797770863 -0.4772029225 0.1713140040 -0.0843827636 -0.0676779419 [6] -0.2329764456 0.0492708113 0.2931329046 0.0474811006 0.0981909796 [11] -0.0588218916 0.0801677682 0.1112235775 -0.0716740268 -0.0423234783 [16] -0.1779618697 -0.2001290807 0.1287728466 -0.0003609413 -0.1916481531 [21] -0.0447058037 -0.0285415201 -0.0862798732 -0.0813738411 -0.1197568288 [26] -0.0202790637 -0.0601999594 0.1127091712 0.0068891655 -0.0812870580 [31] -0.0694794351 -0.0061701328 -0.0073375123 -0.0137135082 0.0027969317 [36] -0.0179630836 0.1540814195 -0.0116165278 -0.0365112945 -0.0921776195 [41] 0.0827580489 -0.1009979485 -0.0047444655 -0.0928097809 -0.0487518016 > 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/3n4g21197319943.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/4i54z1197319943.tab") > > system("convert tmp/1q27z1197319943.ps tmp/1q27z1197319943.png") > system("convert tmp/2zofz1197319943.ps tmp/2zofz1197319943.png") > > > proc.time() user system elapsed 0.885 0.335 1.004