0

I have the following code:

m1 <- ulam(
    alist(
        Y ~ dnorm( mu , sigma ) ,
        mu <- a + b*( p ) ,
        a ~ dnorm( 0 , 0.5 ) ,
        b ~ dlnorm( 0 ,0.1 ) ,
        sigma ~ dexp(1)
    ) , data=d, chains =2, cores=2, messages = FALSE, iter = 2000 )

It works fine, but for R notebook I want to supress the output:

...
Chain 2: Iteration:  400 / 2000 [ 20%]  (Warmup)
Chain 1: Iteration:  200 / 2000 [ 10%]  (Warmup)
Chain 1: Iteration:  400 / 2000 [ 20%]  (Warmup)
...

I set the parameter messages = FALSE but it did not help.

What should I do to suppress such an output?

UPDATE: Thanks to Phil I found the answer. I should set stan parameter refresh =0

zlon
  • 812
  • 8
  • 24
  • 1
    you should tell us that this is from the `rethinking` package, and how to install it (since it's not on CRAN). – Ben Bolker Feb 10 '21 at 15:00
  • 1
    Does this answer your question? [Suppress running messages from RStan in Rmarkdown HTML output](https://stackoverflow.com/questions/47104377/suppress-running-messages-from-rstan-in-rmarkdown-html-output) – Phil Feb 10 '21 at 15:18

0 Answers0