PrePostNEGD.plot#
- PrePostNEGD.plot(*, round_to=None, ci_prob=0.94, hdi_prob=None, kind='ribbon', ci_kind='hdi', num_samples=50, figsize=(7, 9), show=True, legend_kwargs=None)[source]#
Plot the pre-post non-equivalent group design results.
- Parameters:
round_to (
int|None) – Number of decimals used to round numerical results in the figure. Defaults toNone, in which case 2 significant figures are used.ci_prob (
float) – Probability mass of the highest density interval drawn around the posterior predictive bands for the control and treatment groups, and around the posterior of the estimated treatment effect. Must be in(0, 1]. Defaults toHDI_PROB(currently 0.94).kind (
Literal['ribbon','histogram','spaghetti']) – How posterior uncertainty is rendered. Defaults to"ribbon"(mean + credible band).ci_kind (
Literal['hdi','eti']) – Credible interval type whenkind="ribbon". Defaults to"hdi".num_samples (
int) – Number of posterior draws to overlay whenkind="spaghetti". Defaults to 50.figsize (
tuple[float,float]) – Width and height of the figure in inches. Defaults to(7, 9).show (
bool) – Whether to automatically display the plot. Defaults toTrue.legend_kwargs (
dict[str,Any] |None) – Keyword arguments to adjust legend placement and styling. Supported keys:loc,bbox_to_anchor,fontsize,frameon,title(bbox_transformis accepted alongsidebbox_to_anchor). Applied to the rendered matplotlib legend.
- Returns:
Two-facet plot (top: scatter + posterior predictive bands; bottom: estimated treatment effect posterior).
- Return type:
tuple[matplotlib.figure.Figure, matplotlib.axes.Axes or numpy.ndarray]