R version 2.9.0 (2009-04-17) Copyright (C) 2009 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.88,1.03,0.69,0.71,1.11,1.05,1.03,0.65,0.59,0.77,0.9,1.26,0.96,0.83,0.87,0.79,1.12,0.88,0.64,0.64,0.58,0.5,0.99,1.07,0.89,0.89,0.83,0.86,0.9,1.12,0.88,0.88,0.89,0.82,0.88,0.81,0.88,0.76,1.13,0.85,1.45,1.55,0.71,0.81,0.83,0.73,0.9,0.94,1.78,0.88,1.04,0.83,1.41,0.96,1.3,0.83,1.4,0.91,0.87,0.97,1.19,1.23,1.33,1.17,1.09,0.63,0.89,0.63,1.51,0.97,0.84,0.92,0.95,0.73,1.02,0.79,1.27,0.95,0.75,0.52,0.95,0.82,0.76,1.24,0.94,1.04,1.81,0.95,1.39,0.86,1.15,1.51,0.6,0.72,1.1,1.62,1.84,1.73,1.36,1.07,1,1.49,0.9,1.43,1.54,0.81,1.61,1.3,1.4,1.03,0.79,1.11,1.15,1.03,1.59,1.11,1.33,0.93,1.07,1.14,1.12,0.86,0.82,1.02,1.07,1.31,0.98,0.89,0.8,0.8,0.78,0.97) > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1' > par1 = '48' > #'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/14rjx1247736955.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/2fz8e1247736955.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.47809435 0.10247645 -0.12443013 -0.08295611 0.06020993 [7] 0.03732044 -0.09114315 0.21003876 -0.24535527 0.17373908 -0.13034225 [13] 0.17180020 -0.04400937 -0.08470560 0.04187199 0.01730450 -0.14471699 [19] 0.24857808 -0.25909128 0.21689172 -0.10394321 -0.01660838 0.05905736 [25] -0.00613946 -0.01732419 -0.04279981 -0.06786457 0.18567921 -0.09715941 [31] 0.12495590 -0.17828148 0.09722983 -0.11667663 0.05273399 0.04205490 [37] 0.01680301 -0.04354022 0.05712190 -0.08369289 0.15064823 -0.19427520 [43] 0.04841280 0.08823274 -0.11117870 0.08207076 -0.04922296 0.01660453 [49] 0.07761077 > (mypacf <- c(rpacf$acf)) [1] -0.478094346 -0.163460638 -0.193893399 -0.305858559 -0.222140430 [6] -0.116142207 -0.264417627 -0.003068173 -0.214301219 -0.105653624 [11] -0.180023448 0.049094878 0.084533164 -0.040525063 0.062097328 [16] 0.133453874 -0.061131476 0.149098661 -0.036864794 0.024542290 [21] 0.031371788 -0.041176990 -0.033554416 -0.003308990 0.018081197 [26] -0.180383728 -0.192740824 -0.074676112 -0.030209982 0.042145726 [31] -0.102199814 0.064027883 -0.125748890 -0.079672808 0.005688987 [36] -0.121089059 -0.037837190 -0.013457174 0.022790710 0.123347657 [41] -0.053330534 -0.121459983 0.098738557 -0.050450609 -0.019979888 [46] -0.057198377 -0.022708825 -0.032357522 > 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/3o0nq1247736955.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/4uebf1247736955.tab") > > system("convert tmp/14rjx1247736955.ps tmp/14rjx1247736955.png") > system("convert tmp/2fz8e1247736955.ps tmp/2fz8e1247736955.png") > > > proc.time() user system elapsed 0.557 0.293 0.890