R version 2.11.1 (2010-05-31) Copyright (C) 2010 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.0042361726044575 + ,-4.3964831775156E-14 + ,0.0042361726044557 + ,-0.0042361726044575 + ,0.0042361726044557 + ,4.2188474935756E-14 + ,4.2188474935756E-14 + ,4.2188474935756E-14 + ,4.2188474935756E-14 + ,-0.0042361726044575 + ,0.0042361726044557 + ,4.2188474935756E-14 + ,4.2188474935756E-14 + ,-0.0042361726044575 + ,-4.3964831775156E-14 + ,-4.3964831775156E-14 + ,-4.3964831775156E-14 + ,-4.3964831775156E-14 + ,-4.3964831775156E-14 + ,0.0042361726044557 + ,4.2188474935756E-14 + ,4.2188474935756E-14 + ,-0.0042361726044575 + ,-4.3964831775156E-14 + ,0.0042361726044557 + ,-0.0042361726044575 + ,-4.3964831775156E-14 + ,-4.3964831775156E-14 + ,-4.3964831775156E-14 + ,0.0042361726044557 + ,-0.0042361726044575 + ,-4.3964831775156E-14 + ,-4.3964831775156E-14 + ,-4.3964831775156E-14 + ,-4.3964831775156E-14 + ,0.0042361726044557 + ,4.2188474935756E-14 + ,-0.0042361726044575 + ,-4.3964831775156E-14 + ,-4.3964831775156E-14 + ,0.0052924177514559 + ,-0.0052924177515092 + ,0.0052924177514559 + ,-9.3258734068513E-15 + ,-9.3258734068513E-15 + ,-0.0052924177515092 + ,-4.3964831775156E-14 + ,-4.3964831775156E-14 + ,-4.3964831775156E-14 + ,-4.3964831775156E-14 + ,0.0052924177514559 + ,-9.3258734068513E-15 + ,-9.3258734068513E-15 + ,-9.3258734068513E-15 + ,-9.3258734068513E-15 + ,-0.0052924177515092 + ,0.0052924177514559 + ,-9.3258734068513E-15 + ,-9.3258734068513E-15 + ,-9.3258734068513E-15 + ,-0.0052924177515092 + ,0.0052924177514559 + ,-0.0052924177515092 + ,-4.3964831775156E-14 + ,-4.3964831775156E-14 + ,0.0052924177514559 + ,-9.3258734068513E-15 + ,-0.0052924177515092 + ,-4.3964831775156E-14 + ,0.0052924177514559 + ,-9.3258734068513E-15 + ,-9.3258734068513E-15 + ,-0.0052924177515092 + ,-4.3964831775156E-14 + ,0.0015906684159561 + ,-3.3306690738755E-14 + ,-0.0053120974849334 + ,0.0053120974848566 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-0.0053120974849334 + ,-4.3520742565306E-14 + ,0.0053120974848566 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-0.0053120974849334 + ,-4.3520742565306E-14 + ,-4.3520742565306E-14 + ,-4.3520742565306E-14 + ,-0.0093646169310437 + ,0.014676714415899 + ,-0.0053120974849334 + ,0.0053120974848566 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-0.0053120974849334 + ,0.0013306721856563 + ,-0.91895384929365 + ,0.91895384929359 + ,-4.8849813083507E-14 + ,-4.8849813083507E-14 + ,-4.8849813083507E-14 + ,-0.0047987295499485 + ,-4.3520742565306E-14 + ,-4.3520742565306E-14 + ,-4.3520742565306E-14 + ,-4.3520742565306E-14 + ,-4.3520742565306E-14 + ,0.0047987295498562 + ,-4.8849813083507E-14 + ,-0.0026631174194489 + ,-0.013423020332165 + ,-0.0029774010356243 + ,-0.0048913140998841 + ,-4.3076653355456E-14 + ,-4.3076653355456E-14 + ,0.004891314099857 + ,1.5987211554602E-14 + ,1.5987211554602E-14 + ,-0.0048913140998841 + ,-4.3076653355456E-14 + ,-4.3076653355456E-14 + ,-4.3076653355456E-14 + ,-4.3076653355456E-14 + ,-4.3076653355456E-14 + ,0.004891314099857 + ,1.5987211554602E-14 + ,-0.0048913140998841 + ,0.004891314099857 + ,1.5987211554602E-14 + ,1.5987211554602E-14 + ,1.5987211554602E-14 + ,1.5987211554602E-14 + ,-0.0048913140998841 + ,0.004891314099857 + ,1.5987211554602E-14 + ,1.5987211554602E-14 + ,-0.0048913140998841 + ,0.004891314099857 + ,-0.0048913140998841 + ,-4.3076653355456E-14 + ,-4.3076653355456E-14 + ,-4.3076653355456E-14 + ,-4.3076653355456E-14 + ,-4.3076653355456E-14 + ,-4.3076653355456E-14 + ,-4.3076653355456E-14 + ,-4.3076653355456E-14 + ,-4.3076653355456E-14 + ,-4.3076653355456E-14 + ,-4.3076653355456E-14 + ,-4.3076653355456E-14 + ,-4.3076653355456E-14 + ,-4.3076653355456E-14 + ,-4.3076653355456E-14 + ,-4.3076653355456E-14 + ,-4.3076653355456E-14 + ,0.004891314099857 + ,-0.0048913140998841 + ,-4.3076653355456E-14 + ,0.004891314099857 + ,1.5987211554602E-14 + ,-0.0048913140998841 + ,-4.3076653355456E-14 + ,0.004891314099857 + ,-0.0048913140998841 + ,-4.3076653355456E-14 + ,-4.3076653355456E-14 + ,-4.3076653355456E-14 + ,-4.3076653355456E-14 + ,0.004891314099857 + ,1.5987211554602E-14 + ,-0.0048913140998841 + ,-4.3076653355456E-14 + ,0.004891314099857 + ,1.5987211554602E-14 + ,1.5987211554602E-14 + ,1.5987211554602E-14 + ,1.5987211554602E-14 + ,-0.0048913140998841 + ,-0.018974857760943 + ,-1.0214051826551E-14 + ,-1.0214051826551E-14 + ,-1.0214051826551E-14 + ,0.02684357289639 + ,-2.4424906541753E-14 + ,-0.026843572896424 + ,-1.0214051826551E-14 + ,0.02684357289639) > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '1' > par1 = 'Default' > #'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: > 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 (par6 == 'White Noise') par6 <- 'white' else par6 <- 'ma' > par7 <- as.numeric(par7) > 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/rcomp/tmp/18py71290523531.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > racf <- acf(x, par1, main='Autocorrelation', xlab='time lag', ylab='ACF', ci.type=par6, ci=par7, sub=paste('(lambda=',par2,', d=',par3,', D=',par4,', CI=', par7, ', CI type=',par6,')',sep='')) > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/28py71290523531.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.996858e-01 2.743567e-03 -3.001825e-03 -2.361995e-03 [6] 2.345437e-03 -2.702626e-03 5.883625e-03 -1.099596e-02 1.301042e-02 [11] -2.436244e-03 -2.674416e-03 -1.595919e-03 -3.019544e-03 3.113374e-03 [16] -1.067339e-03 2.498911e-03 7.427331e-05 2.754039e-03 -2.675708e-03 [21] -1.691605e-04 -2.492251e-03 -4.154386e-04 2.880289e-03 > (mypacf <- c(rpacf$acf)) [1] -0.49968584 -0.32911868 -0.24757185 -0.20214560 -0.16805510 -0.14839539 [7] -0.12361548 -0.12383877 -0.10094494 -0.08659886 -0.07959881 -0.07651254 [13] -0.07923912 -0.07603305 -0.07523821 -0.07037307 -0.06572665 -0.05661746 [19] -0.05350319 -0.05081797 -0.05308278 -0.05584041 -0.05320127 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/3xrhb1290523532.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/rcomp/tmp/47iye1290523532.tab") > > try(system("convert tmp/18py71290523531.ps tmp/18py71290523531.png",intern=TRUE)) character(0) > try(system("convert tmp/28py71290523531.ps tmp/28py71290523531.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.830 0.440 1.247