Set the max_lag parameter

The Meridian model allows for media at time \(t\) to affect the KPI at times \(t, t + 1, \dots , t + L\) where the integer \(L\) is a hyperparameter set by the user using max_lag of ModelSpec. Media can potentially have a long effect that can go beyond max_lag. However, the lagged effect of media converges towards zero, due to the model assumption of geometric decay.

In practice, max_lag is used to truncate how long media can have an effect because it has positive benefits including improved model convergence, reasonable model runtimes, and maximizing data usage (reducing variance). Keeping the max_lag in the 2-10 range leads to a good balance of these advantages and disadvantages.

Increasing max_lag doesn't necessarily mean that ROI estimates will also increase. One reason for this is because if the media at time \(t\) can affect the KPI at time \(t+L\), this can take away from the effect of media at times \(t+1, \dots , t+L\) on the KPI at time \(t+L\).