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(5.7,5.7,5.6,5.8,5.6,5.6,5.6,5.5,5.4,5.4,5.5,5.4,5.4,5.2,5.4,5.2,5.1,5.1,5.0,5.0,4.9,5.1,5.0,5.0,4.8,4.7,4.7,4.7,4.7,4.7,4.6,4.7,4.7,4.5,4.4,4.5,4.4,4.6,4.5,4.4,4.5,4.5,4.6,4.7,4.7,4.7,4.8,4.7,5.0,4.9,4.8,5.1,5.0,5.5,5.5,5.7,6.1,6.1,6.5,6.7) > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '' > par6 = '' > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1' > par1 = '60' > ylab = '' > xlab = '' > main = '' > #'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/freestat/rcomp/tmp/16f8z1229451162.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/freestat/rcomp/tmp/29r7f1229451162.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.143246179 0.330944518 0.276907486 -0.044161465 [6] 0.407756720 -0.014074499 0.145085230 0.107365493 0.061546661 [11] 0.012154698 0.262548348 -0.064356715 0.051329931 0.103891280 [16] -0.081398729 0.205321743 -0.060721005 0.051511616 -0.040043281 [21] -0.075380932 0.059124200 -0.048867096 -0.025605413 -0.106679129 [26] -0.008500820 -0.073138137 0.001576618 -0.054842500 -0.110070574 [31] -0.021301508 -0.139773984 0.063811662 -0.219858528 0.045780477 [36] -0.130100290 -0.119820980 0.043983818 -0.169414814 0.042389031 [41] -0.203763293 -0.049367738 -0.056596765 -0.090743373 -0.078081976 [46] -0.024448688 -0.070267520 -0.109178301 0.020681761 -0.136499625 [51] 0.031950243 -0.119275926 -0.058615483 0.030272688 -0.096417988 [56] 0.018196720 -0.007731688 -0.019605785 -0.002180215 > (mypacf <- c(rpacf$acf)) [1] -0.1432461786 0.3169282488 0.4025525960 -0.0568805201 0.2138884768 [6] 0.0370358107 -0.0361865423 -0.0865920408 0.0725886568 -0.1498895094 [11] 0.2678468295 -0.0068513990 -0.1253503551 -0.0574731265 0.0587938292 [16] 0.0219150482 0.0328150863 -0.0004386855 -0.1716283002 -0.1313911991 [21] 0.0772882567 0.0070634615 -0.0285242087 -0.0615150502 0.0058991195 [26] -0.0179803646 0.0373313610 -0.0183350826 -0.0953222278 0.0013872397 [31] -0.0162315233 0.0556238952 -0.2156737640 0.1078766490 0.0254328150 [36] -0.0321214195 -0.0293148562 0.0487191311 -0.0711239982 -0.0892928842 [41] -0.0173540594 -0.0001565325 -0.0663128503 0.0258564393 0.1063111440 [46] 0.0004596565 -0.0822146908 -0.0463694563 -0.0348833155 0.0181547246 [51] 0.0367239735 -0.0660448842 -0.0321709218 0.0810531298 0.0147548653 [56] 0.0099315574 0.0541090302 0.0206073825 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #Note: the /var/www/html/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/33zeu1229451162.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/freestat/rcomp/tmp/4yfij1229451162.tab") > > system("convert tmp/16f8z1229451162.ps tmp/16f8z1229451162.png") > system("convert tmp/29r7f1229451162.ps tmp/29r7f1229451162.png") > > > proc.time() user system elapsed 0.804 0.422 0.891