0

I've been trying to run (RStudio) the following Bayesian regression model in a loop around 400 times to get the results for different parameters. After running it, I get the following error messages. I want to use a Bayesian regression model to make the data more coherent with my other analyses. I already tried to increase the iterations to 1000, but this did not work. Hence my questions:

  1. How can I easily fix these error messages without correcting and checking each out of the 400 regression models individually?
  2. Is there a computationally less demanding way of running these regression models using the Bayesian framework?

Thank you very much in advance!

Model: stan_glm(log10(Y) ~ log10(X), data = tmp, chains = 4, cores = 7, iter = 1000)

Error Messages:

Warning messages:
1: There were 675 divergent transitions after warmup. See
https://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup
to find out why this is a problem and how to eliminate them. 
2: There were 4 chains where the estimated Bayesian Fraction of Missing Information was low. See
https://mc-stan.org/misc/warnings.html#bfmi-low 
3: Examine the pairs() plot to diagnose sampling problems
 
4: The largest R-hat is 2.23, indicating chains have not mixed.
Running the chains for more iterations may help. See
https://mc-stan.org/misc/warnings.html#r-hat 
5: Bulk Effective Samples Size (ESS) is too low, indicating posterior means and medians may be unreliable.
Running the chains for more iterations may help. See
https://mc-stan.org/misc/warnings.html#bulk-ess 
6: Tail Effective Samples Size (ESS) is too low, indicating posterior variances and tail quantiles may be unreliable.
Running the chains for more iterations may help. See
https://mc-stan.org/misc/warnings.html#tail-ess 
7: Markov chains did not converge! Do not analyze results! 
8: Bulk Effective Samples Size (ESS) is too low, indicating posterior means and medians may be unreliable.
Running the chains for more iterations may help. See
https://mc-stan.org/misc/warnings.html#bulk-ess 
9: Tail Effective Samples Size (ESS) is too low, indicating posterior variances and tail quantiles may be unreliable.
Running the chains for more iterations may help. See
https://mc-stan.org/misc/warnings.html#tail-ess ```
  • 1
    None of these are errors! They are just warnings telling you that your models have some statistical problems. – deschen Jan 19 '23 at 08:19
  • 1
    They are warnings as said above and no errors, but if you want to see on which model your warning belongs to, you can change the warning settings to `options(warn=1)` then warnings are thrown as they occur and not accumulated and shown at once. If you loop your models, you could `message` which one processes so you can easily see below if there were warnings or not. – Merijn van Tilborg Jan 19 '23 at 08:34

0 Answers0