NestedLogit.plot_change#

static NestedLogit.plot_change(change_df, title='Change in Proportion due to Intervention', figsize=(8, 4))[source]#

Plot change induced by a market intervention.

Parameters:
change_dfpd.DataFrame

A DataFrame indexed by product (or mode) with the following columns: - ‘policy_share’: share before the intervention - ‘new_policy_share’: share after the intervention

titlestr, optional

Title of the plot. Default is “Change in Proportion due to Intervention”.

figsizetuple, optional

Size of the plot in inches, as (width, height). Default is (8, 4).

Returns:
object

A matplotlib Figure object showing before/after market share comparisons, with colored lines indicating gain (green) or loss (red) for each product.