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(565464,547344,554788,562325,560854,555332,543599,536662,542722,593530,610763,612613,611324,594167,595454,590865,589379,584428,573100,567456,569028,620735,628884,628232,612117,595404,597141,593408,590072,579799,574205,572775,572942,619567,625809,619916,587625,565742,557274,560576,548854,531673,525919,511038,498662,555362,564591,541657,527070,509846,514258,516922,507561,492622,490243,469357,477580,528379,533590,517945) > par5 = '12' > par4 = '1' > 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/1c6x71229626838.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/2g2v61229626838.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 -8.258991e-02 6.137524e-02 1.870347e-01 9.445209e-02 [6] -6.118081e-02 6.514585e-02 -1.237074e-02 9.533630e-02 -5.017792e-02 [11] -1.065135e-01 2.063137e-01 -2.346780e-01 -1.734144e-01 1.081973e-01 [16] -1.121339e-01 -1.655579e-01 5.129974e-03 -8.811061e-03 3.049493e-02 [21] 1.076296e-02 2.571220e-03 4.968159e-02 3.917680e-02 -1.030620e-01 [26] 2.136285e-02 -5.405522e-02 -3.215364e-02 -2.623519e-02 1.051182e-01 [31] -7.502065e-02 -7.361581e-04 -2.699194e-02 4.549469e-03 -9.875927e-02 [36] -4.069269e-02 -4.002843e-02 -3.574545e-04 5.510759e-05 -2.133019e-02 [41] 2.628164e-02 -6.697379e-02 -1.799619e-02 3.888642e-02 -3.134677e-02 [46] -1.603614e-02 7.277458e-03 > (mypacf <- c(rpacf$acf)) [1] -0.0825899134 0.0549288239 0.1983087474 0.1294572182 -0.0684323836 [6] -0.0017345246 -0.0427361618 0.1070004519 -0.0276763880 -0.1424324315 [11] 0.1735161319 -0.2151512104 -0.1899449760 0.0707132358 -0.0501776784 [16] -0.0662297151 -0.0406960146 0.0426003205 0.0918332856 0.0721417186 [21] 0.0573876552 -0.0834451722 0.0974728943 -0.0713205284 -0.1700806268 [26] -0.0605344853 -0.0022175846 -0.0765772159 0.0981446683 -0.0365290097 [31] -0.0186626056 -0.0009582317 0.0411500989 -0.1075627448 0.0118764693 [36] 0.0153937638 -0.0768194341 0.0285768105 0.0128421587 -0.0919358907 [41] -0.0714205654 -0.0174867767 0.0089651202 -0.0088139275 0.0919187548 [46] -0.0658447322 > 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/39zrn1229626838.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/40zga1229626838.tab") > > system("convert tmp/1c6x71229626838.ps tmp/1c6x71229626838.png") > system("convert tmp/2g2v61229626838.ps tmp/2g2v61229626838.png") > > > proc.time() user system elapsed 0.630 0.334 1.853