Using R the easiest way to do Bayesian analysis is to load the rstanarm
package and just use e.g. stan_glm
instead of base R's lm
or glm
.
However, these functions always output very verbous information on the current status of the Markov chains. I'd like to suppress this output.
I have seen that I can achieve such by calling the functions with the additional parameter refresh=0
, like stan_glm(Petal.Length~Species+Sepal.Width, data=iris, refresh=0)
.
How can I add this automatically as default paramater without defining a helper function for every single one of the modeling functions. Is there a way similar to options
or rstan_options
?
(neither does cover this particular option unfortunately)
I've also tried the approach described in Set default values for function parameters in R like: formals(stan_glm)$refresh <- 0
However, it does not change anything with this regard