I am using the time_varying_media=True option in the MMM model from the pymc-marketing library. When I attempt to run add_lift_test_measurements, I encounter a KeyError related to missing columns, specifically date.
KeyError: “None of [MultiIndex([(0, ‘channel_1’),\n (1, ‘channel_1’),\n (2, ‘channel_1’)],\n names=[None, ‘channel’])] are in the [index]”
- The error occurs only when
time_varying_media=Trueis enabled. - When
time_varying_media=False, this issue does not occur. - Even after adding the
datecolumn explicitly to thedf_lift_testinput, the error persists, indicating that the issue isn’t resolved by simply including this column.
How should I structure the lift test and calibration process to work correctly with time_varying_media=True? Is there a specific requirement or additional step needed to ensure that the date column is handled properly?