EventStudy.plot#

EventStudy.plot(*, group='posterior', hdi_prob=0.94, figsize=(8, 5), show=True, legend_kwargs=None)[source]#

Plot event-time coefficients.

Parameters:
  • group (Literal['prior', 'posterior']) – Which draw group to plot. Both groups draw the coefficient path. "prior" requires sample_prior_predictive(); "posterior" requires fit().

  • hdi_prob (float) – Interval probability drawn as error bars when the group has posterior draws. Ignored for point-estimate fits.

  • figsize (tuple[float, float]) – Passed to matplotlib.pyplot.subplots().

  • show (bool) – Whether to display the figure before returning it.

  • legend_kwargs (dict[str, Any] | None) – Legend styling applied in place. Supported keys are loc, bbox_to_anchor, fontsize, frameon, and title.

Return type:

tuple[Figure, Axes]