depictr.compare_models#

depictr.compare_models(models, intercept=False, conf_level=0.95, title=None)#

Dodged forest comparing each coefficient across several models.

Each model contributes its estimates and confidence intervals (read with depictr.models.tidy_estimates(), so a fitted model or a tidy frame both work); the terms share a y-axis and the models are dodged apart and coloured, so a coefficient that shifts from one specification to the next is easy to spot.

Parameters:
  • models (dict) – {name: fitted_model_or_tidy_frame}. The keys label and colour the models.

  • intercept (bool) – Whether to keep the intercept term.

  • conf_level (float) – Confidence level passed to depictr.models.tidy_estimates().

  • title (str, optional) – Plot title.

Return type:

plotnine.ggplot