sibylhe / mmm_stan

Python/STAN Implementation of Multiplicative Marketing Mix Model, with deep dive into Adstock (carry-over effect), ROAS, and mROAS
MIT License
352 stars 162 forks source link

Definition formula of mc_df['mc_delta'] #4

Closed hiroki-kurasawa closed 3 years ago

hiroki-kurasawa commented 3 years ago

Hi Sibyl

thanks to this repository, I now have a deeper understanding of marketing mix modeling

I have a question about line 541 of mmm_stan.py. https://github.com/sibylhe/mmm_stan/blob/main/mmm_stan.py#L541

in README, definition of delta is mc_pred - mc_ture, but delta is mc_true - mc_pred in line 541 . Is there any problem?

sibylhe commented 3 years ago

Indeed! Fixed it. Thanks for pointing out this error!

hiroki-kurasawa commented 3 years ago

you should fix it as mc_df['mc_delta'] = mc_df['mc_pred'] - mc_df['mc_true'] instead of mc_df['mc_delta'] = ['mc_pred'] - mc_df['mc_true']

https://github.com/sibylhe/mmm_stan/blob/main/mmm_stan.py#L541

sibylhe commented 3 years ago

👌