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(104708,101817,97898,95559,92822,90848,101141,105841,93647,90923,89130,90212,93196,91861,90593,89895,88819,87924,96906,101217,98709,98139,95529,98577,100772,100180,99200,96251,94514,93780,105192,107682,99687,99436,102049,102673,105813,105056,103916,103513,101893,102503,113149,116696,108500,107800,105941,108742,111680,111270,110698,108517,107127,107088,116321,125045,116779,122887,120162,123198,123610,122293,121289,119393,117494,116693,125062,127281,120195,119804,117113,119240,115823,116281,113816,114632,112987,111633,116721,114850,112797,105368,102524,101327,102612,98873,95993,93244,90403,88539,98106,96963,90781,89253,87794,89810,90864,89025,87621,87718,83433,84535,92223,91052,88456,88706,89137,94066,99258,100673,102269,100833,99314,101764,108242,108148,104761,103772,103737,111043,109906,109335,107247,105690,102755,102280,110590,109122,102803,101424,99138) > par8 = '' > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '1' > 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: > 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/html/rcomp/tmp/1ubu61292959612.ps",horizontal=F,onefile=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/html/rcomp/tmp/2ubu61292959612.ps",horizontal=F,onefile=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.072526151 0.211977454 0.055148913 0.163505185 [6] 0.131119046 0.049685920 0.071045720 -0.025970446 0.114851857 [11] -0.016280254 0.062054093 -0.307032913 0.039052718 0.130012299 [16] -0.073979404 0.003043504 -0.095207051 0.066030906 0.016967802 [21] -0.016172196 -0.047532379 -0.113898165 -0.036474873 -0.178710206 [26] -0.024947080 -0.230228597 -0.075672737 -0.085454692 -0.064136153 [31] -0.166473493 -0.125861121 -0.069103769 0.032913388 -0.050293325 [36] 0.074876295 0.024130360 0.062175540 -0.085467487 0.049306786 [41] -0.062009776 0.034108802 0.053843835 0.020783132 -0.019119712 [46] -0.096612087 0.054682713 -0.093750980 -0.036917282 > (mypacf <- c(rpacf$acf)) [1] -7.252615e-02 2.078105e-01 8.657410e-02 1.363886e-01 1.344116e-01 [6] 1.096745e-02 7.155515e-03 -7.596449e-02 5.085337e-02 -1.617604e-02 [11] 1.812235e-02 -3.317555e-01 -5.732456e-02 2.671556e-01 -1.159818e-05 [16] -8.723409e-03 -2.616463e-02 3.688903e-02 6.731445e-02 -6.178462e-02 [21] -3.805385e-02 -1.317557e-01 -1.011740e-01 -3.302540e-01 -5.825494e-02 [26] 6.020615e-02 -6.634446e-02 -2.130484e-02 4.771202e-02 -2.491827e-02 [31] 2.286581e-02 -3.523972e-02 1.574802e-01 -1.854320e-02 9.360432e-02 [36] -5.711822e-02 5.973134e-02 -1.498603e-01 -1.588655e-01 -6.707820e-02 [41] 4.289362e-02 4.143289e-02 4.349815e-02 -2.212602e-02 1.152526e-02 [46] -1.868402e-02 -4.521642e-02 -1.269817e-01 > 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/3xtbc1292959612.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/4jca01292959612.tab") > > try(system("convert tmp/1ubu61292959612.ps tmp/1ubu61292959612.png",intern=TRUE)) character(0) > try(system("convert tmp/2ubu61292959612.ps tmp/2ubu61292959612.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.590 0.333 1.239