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_eventspd.DataFrame
The DataFrame containing the event data.
  • name: name of the event. Used as the model coordinates.

  • start_date: start date of the event

  • end_date: end date of the event

prefixstr

The prefix to use for the event effect and associated variables.

effectEventEffect

The event effect to apply.

Raises:
ValueError

If the event effect dimensions do not contain the prefix and model dimensions.