MMM.add_events#
- MMM.add_events(df_events, prefix, effect)[source]#
Add event effects to the model.
This must be called before building the model.
- Parameters:
- df_events
pd.DataFrame
- The DataFrame containing the event data.
name
: name of the event. Used as the model coordinates.start_date
: start date of the eventend_date
: end date of the event
- prefix
str
The prefix to use for the event effect and associated variables.
- effect
EventEffect
The event effect to apply.
- df_events
- Raises:
ValueError
If the event effect dimensions do not contain the prefix and model dimensions.