0

Curious to know if there's any way to disable the output messages that are printed during a run of the MCMC() function in the adaptMCMC package. I'm running this function many times and these print statements are filling up my disk.

Here's how it looks (straight from the manual):

library(adaptMCMC)
#log-pdf to sample from
p.log <- function(x) {
B <- 0.03 # controls 'bananacity'
-x[1]^2/200 - 1/2*(x[2]+B*x[1]^2-100*B)^2
}

samp <- MCMC(p.log, n=200, init=c(0, 1), scale=c(1, 0.1),
adapt=TRUE, acc.rate=0.234)

  generate 200 samples 

And the output message is:

  |========================================================================================================================================================| 100%

My gibbs sampler is much more elaborate than that which results in heavy standard output.

Roland
  • 127,288
  • 10
  • 191
  • 288
user1701545
  • 5,706
  • 14
  • 49
  • 80
  • So somehow the progress bar is being written to disc? I'm not sure how you're capturing the results. Can you just capture and ignore the output from the function, ie `ignore<-capture.output(samp <- MCMC(p.log, n=200, init=c(0, 1), scale=c(1, 0.1), adapt=TRUE, acc.rate=0.234))` ? – MrFlick Sep 18 '14 at 05:55
  • Yeah that'll work. Thanks! – user1701545 Sep 18 '14 at 06:04

0 Answers0