depictr.estimation_plot#
- depictr.estimation_plot(data, y, group, reference=None, conf_level=0.95, n_boot=2000, effsize='hedges_g', two_panel=False, title=None, seed=None)#
Cumming-style estimation plot of mean differences.
For each non-reference group, the mean difference from the reference group is drawn as a point with a bootstrap confidence interval. A dashed line marks a difference of zero (the reference), and the standardised effect size is annotated beside each point. With
two_panel=Truethis difference axis sits beneath a panel of the raw data and group means (the Gardner-Altman layout).- Parameters:
data (pandas.DataFrame) – The data.
y (str) – Name of the numeric outcome column.
group (str) – Name of the grouping column.
reference (str, optional) – The reference (control) group the others are compared with. Defaults to the first group level.
conf_level (float) – Confidence level for the bootstrap difference intervals.
n_boot (int) – Number of bootstrap resamples for each difference interval.
effsize ({"hedges_g", "cohens_d", "none"}) – Standardised effect size annotated beside each difference. Hedges’ g is the small-sample corrected default; pass
"none"to omit it.two_panel (bool) – When
True, place the difference axis beneath a panel of the raw data and group means (the Gardner-Altman layout), returning a composition.title (str, optional) – Plot title.
seed (int, optional) – Seed for the bootstrap, for reproducible intervals.
- Returns:
A single panel by default, or a two-panel composition when
two_panel=True. Either carries.differences, a DataFrame of the computed mean differences, their bootstrap intervals, and effect sizes.- Return type:
plotnine.ggplot or plotnine.composition.Compose