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(20.72,21.45,22.09,21.53,23.35,23.57,26.42,25.21,26.44,29.34,29.40,33.05,28.38,26.01,29.31,30.36,35.75,36.15,34.21,37.91,38.70,42.12,42.16,39.80,37.36,38.35,42.60,41.25,42.16,46.94,47.43,47.06,50.18,50.13,43.23,40.04,40.37,42.21,37.00,39.74,42.68,46.29,46.97,48.73,52.37,50.05,54.04,57.78,64.72,63.41,64.36,66.03,72.14,76.60,86.97,93.48,95.59,81.89,70.55,50.38,36.25) > par5 = '12' > par4 = '0' > par3 = '2' > par2 = '-0.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/1z0z51229706926.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/2e2np1229706926.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.000000e+00 -4.185807e-01 1.159521e-02 3.244654e-02 -9.730657e-02 [6] 2.050651e-01 -2.118430e-01 1.250815e-01 2.299352e-02 -2.789915e-01 [11] 2.255387e-01 5.936377e-02 -8.197392e-03 -8.880413e-02 -9.719623e-02 [16] 2.395642e-01 -1.214817e-01 -5.263498e-03 2.385762e-02 -8.831252e-02 [21] -4.316413e-02 5.387833e-02 1.640817e-02 3.960203e-02 -1.375049e-01 [26] 9.677189e-02 5.959875e-02 -3.222372e-02 2.632541e-02 -6.716599e-02 [31] 5.247191e-03 -6.737757e-03 -7.651381e-03 8.658719e-02 -1.489964e-01 [36] 1.112754e-01 -8.451146e-02 7.954319e-02 -1.477783e-02 8.786696e-03 [41] 1.412525e-02 -7.066303e-02 8.470789e-02 -1.053839e-01 4.223811e-02 [46] -3.754459e-02 -7.917721e-03 6.345504e-02 -2.293025e-02 -1.188136e-02 [51] 3.648503e-02 -7.155313e-02 6.261950e-02 -6.186422e-02 3.553753e-02 [56] -3.539775e-02 1.551907e-02 -3.733059e-04 2.194031e-06 > (mypacf <- c(rpacf$acf)) [1] -0.418580696 -0.198371155 -0.056505806 -0.128754263 0.141991145 [6] -0.091029088 0.033869067 0.072609850 -0.269827318 -0.048033237 [11] 0.196660004 0.117211414 -0.059845586 -0.119813959 0.083142801 [16] 0.036502849 -0.014404997 -0.071149634 -0.055583509 -0.131584160 [21] -0.010344089 -0.090493974 0.008353862 0.025010688 0.052125279 [26] 0.023053049 0.030106840 0.041977138 -0.017106628 -0.049540086 [31] -0.017402682 -0.016809609 0.032636173 -0.096690138 0.095164141 [36] -0.081456132 0.010485428 -0.076053527 0.077291653 0.004717700 [41] -0.013857107 0.027439903 -0.135583062 -0.014843778 -0.031694395 [46] -0.005900973 0.031369031 0.078370389 -0.041667589 -0.049874371 [51] -0.035846299 -0.051507426 -0.030549988 -0.029953191 -0.012841724 [56] 0.027447716 -0.009666060 -0.012073621 > 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/3n7v51229706926.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/48qio1229706926.tab") > > system("convert tmp/1z0z51229706926.ps tmp/1z0z51229706926.png") > system("convert tmp/2e2np1229706926.ps tmp/2e2np1229706926.png") > > > proc.time() user system elapsed 0.593 0.331 0.746