add_menten_empirical_lift_measurements_to_likelihood#

pymc_marketing.mmm.lift_test.add_menten_empirical_lift_measurements_to_likelihood(df_lift_test, alpha_name, lam_name, dist=<class 'pymc.distributions.continuous.Gamma'>, model=None, name='lift_measurements')[source]#

Add empirical lift measurements to the likelihood of the model.

Specific implementation of the add_lift_measurements_to_likelihood function for the Michaelis-Menten saturation function.

Parameters:
  • df_lift_test (pd.DataFrame) –

    DataFrame with lift test results with at least the following columns:
    • x: x axis value of the lift test.

    • delta_x: change in x axis value of the lift test.

    • delta_y: change in y axis value of the lift test.

    • sigma: standard deviation of the lift test.

    Any additional columns are assumed to be coordinates in the model.

  • alpha_name (str) – Name of the alpha parameter in the model.

  • lam_name (str) – Name of the lambda parameter in the model.

  • dist (pm.Distribution, optional) – PyMC distribution to use for the likelihood, by default pm.Gamma

  • model (Optional[pm.Model], optional) – PyMC model with date and channel coordinates, by default None

  • name (str, optional) – Name of the likelihood, by default “lift_measurements”

Return type:

None