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(1.1608,1.1208,1.0883,1.0704,1.0628,1.0378,1.0353,1.0604,1.0501,1.0706,1.0338,1.0110,1.0137,0.9834,0.9643,0.9470,0.9060,0.9492,0.9397,0.9041,0.8721,0.8552,0.8564,0.8973,0.9383,0.9217,0.9095,0.8920,0.8742,0.8532,0.8607,0.9005,0.9111,0.9059,0.8883,0.8924,0.8833,0.8700,0.8758,0.8858,0.9170,0.9554,0.9922,0.9778,0.9808,0.9811,1.0014,1.0183,1.0622,1.0773,1.0807,1.0848,1.1582,1.1663,1.1372,1.1139,1.1222,1.1692,1.1702,1.2286) > 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/1qa7g1196264722.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/2e5k51196264722.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.281674276 0.041519785 -0.068811199 -0.037997785 [6] 0.082344061 0.124399889 0.211771160 0.192916279 0.186700860 [11] 0.191034292 0.171925756 -0.026059002 -0.059344767 0.013311316 [16] 0.073177033 0.062510475 0.266404656 0.182805983 0.011409974 [21] -0.109715519 -0.076113448 -0.116634005 -0.081789008 0.085072883 [26] 0.027929618 -0.023855356 -0.060022760 0.007321315 -0.025701020 [31] -0.178390684 -0.148413488 -0.150256415 -0.020831351 -0.002167847 [36] 0.139039927 -0.082658799 -0.193786761 -0.196892912 -0.132430674 [41] -0.048961585 -0.089512883 -0.013096331 -0.083540317 -0.073528570 [46] -0.038484344 -0.141838041 -0.149663203 -0.062022047 -0.079568120 [51] 0.009723800 -0.083261127 0.031744401 0.032162659 -0.038927692 [56] -0.056681437 -0.072146744 -0.046611870 -0.057183289 > (mypacf <- c(rpacf$acf)) [1] 0.281674276 -0.041079909 -0.075525061 0.004406387 0.102897214 [6] 0.074129211 0.165475429 0.115872302 0.140576293 0.160903163 [11] 0.142162167 -0.098334345 -0.044461460 -0.001598510 -0.033865329 [16] -0.102543473 0.201468178 0.002163304 -0.095218187 -0.105695764 [21] -0.013071111 -0.190591767 -0.093659166 0.045807694 -0.133119784 [26] -0.119738403 -0.023218989 0.007102172 0.011089258 -0.070992093 [31] -0.001363057 -0.119075987 0.112658758 -0.035521057 0.162530028 [36] -0.086721033 0.045028571 -0.081366677 0.044730996 0.062118727 [41] -0.057694182 0.002383028 -0.039520501 -0.009541105 -0.002021175 [46] -0.177005578 0.051986718 0.039999155 -0.027334597 -0.015589422 [51] -0.009130141 0.016209178 0.063980541 0.055356344 0.089069299 [56] 0.012015193 0.007984771 -0.031218372 > 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/3dku71196264722.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/4ydqw1196264722.tab") > > system("convert tmp/1qa7g1196264722.ps tmp/1qa7g1196264722.png") > system("convert tmp/2e5k51196264722.ps tmp/2e5k51196264722.png") > > > proc.time() user system elapsed 0.892 0.310 1.000