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_df
pd.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
- title
str
, optional Title of the plot. Default is “Change in Proportion due to Intervention”.
- figsize
tuple
, optional Size of the plot in inches, as (width, height). Default is (8, 4).
- change_df
- Returns:
object
A matplotlib Figure object showing before/after market share comparisons, with colored lines indicating gain (green) or loss (red) for each product.