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(10.812,10.738,10.171,9.721,9.897,9.828,9.924,10.371,10.846,10.413,10.709,10.662,10.57,10.297,10.635,10.872,10.296,10.383,10.431,10.574,10.653,10.805,10.872,10.625,10.407,10.463,10.556,10.646,10.702,11.353,11.346,11.451,11.964,12.574,13.031,13.812,14.544,14.931,14.886,16.005,17.064,15.168,16.05,15.839,15.137,14.954,15.648,15.305,15.579,16.348,15.928,16.171,15.937,15.713,15.594,15.683,16.438,17.032,17.696,17.745,19.394,20.148,20.108,18.584,18.441,18.391,19.178,18.079,18.483,19.644,19.195,19.65,20.83) > 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/1x2i21242324548.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/2a9jd1242324548.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.212001e-02 -9.196502e-02 1.881745e-01 8.304894e-02 [6] -2.449505e-01 -5.474712e-02 -3.925745e-02 -1.247927e-01 5.499588e-03 [11] -2.058149e-02 1.047605e-01 1.931625e-02 7.049666e-03 8.476349e-03 [16] -5.635783e-02 -1.033919e-01 -5.725339e-02 4.267246e-02 -1.161479e-01 [21] 1.001198e-01 5.039455e-02 1.438012e-01 3.228867e-02 -3.687815e-02 [26] -3.723776e-03 1.231200e-01 -5.773149e-02 -1.448895e-01 1.133068e-01 [31] -7.556056e-02 -1.501820e-01 1.067538e-01 -4.962628e-02 -8.020509e-02 [36] -7.931616e-05 1.505260e-02 -4.783912e-02 8.122627e-03 1.016217e-01 [41] 3.738302e-02 3.364122e-02 2.552415e-02 2.758618e-02 -4.943601e-02 [46] -3.207669e-02 -1.497513e-02 9.745765e-03 -3.306680e-02 > (mypacf <- c(rpacf$acf)) [1] -0.0421200127 -0.0939057163 0.1819058514 0.0922994634 -0.2168373325 [6] -0.1007373720 -0.1157723206 -0.0721321765 0.0621660888 -0.0431587851 [11] 0.1327085118 -0.0079801328 -0.0329809370 -0.0398458447 -0.1329167381 [16] -0.0832619025 -0.0571274934 0.0811545917 -0.0444900411 0.1116611209 [21] -0.0051725111 0.1321365579 0.0063558057 -0.1320724117 -0.0503935382 [26] 0.1266238498 0.0743056764 -0.0240892027 0.0543005138 -0.0930910929 [31] -0.1475322748 0.0543296188 -0.1417451563 0.0242100208 -0.0305002943 [36] -0.0010867023 0.0587447209 -0.0673839941 0.1447288649 -0.0262360379 [41] 0.0689181219 0.0006102415 -0.0726887257 -0.0358232052 -0.0257027466 [46] 0.0333932847 0.0236221762 -0.0126291466 > 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/3s7jv1242324548.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/4x8031242324548.tab") > > system("convert tmp/1x2i21242324548.ps tmp/1x2i21242324548.png") > system("convert tmp/2a9jd1242324548.ps tmp/2a9jd1242324548.png") > > > proc.time() user system elapsed 0.566 0.313 0.787