A New Generation of Marketing Mix Modeling. Robyn aims to reduce human bias in the modeling process, esp. by automating modelers decisions like adstocking, saturation, trend & seasonality as well as model validation. Moreover, the budget allocator & calibration enable actionability and causality of the results
Marketing Modeling Mix (MMM) have been around for more than 60 years, but with dawn of digital marketing that relied on tags, cookies, pixels and mobiles IDs to craft well architected bigger, better, more targeted campaigns they fell out of use. Until now.
There are two main reason for their comeback
- A new wave of consumer privacy requirements and increased regulatory pressure have ushered in an enhanced focus on privacy and data protection. With these market changes, advertisers are becoming more concerned with platform-lock-in risks, the uncertainty surrounding matching algorithms’ accuracy without cookies and IDs, and the difficulty brands may have in collecting and building first-party data pools. Given this new environment, brands and marketers need to rethink their measurement strategies and audience-building methods
- Inability to attribute the impact of offline channels (TV, Radio, Newspapers) to conversion or sales
Thus Marketing mix modeling (MMM) is a privacy-friendly, highly resilient, data-driven statistical analysis that quantifies the incremental sales impact and ROI of marketing and non-marketing activities. MMM is an econometric model that aims to quantify the incremental impact of marketing and non-marketing activities on a pre-defined KPI (like sales or website visits).
This is a holistic model used to understand how to allocate a marketing budget across marketing channels, products and regions and can help forecast the impact of future events or campaigns
Time series data with weekly interval by impression, clicks and Spends for each channel.
Target Variable is Revenue
Our Marketing Variables are
- Tv Spend
- Radio Spend
- Print Spend
- Facebook Spend
- Facebook Impressions
- Paid Search Clicks
- Organic Search Clicks
- Competitor Sales
- Online Events (Email Marketing, coupons etc)
- Newsletter Clicks
It is necessary to have the R 4.0.0 version (or higher) installed in order to be able to run this code. Install R Studio from here
To install or update Robyn to the latest stable version of the package, run:
install.packages("Robyn")
then install Reticulate Package
install.packages("reticulate")
library(reticulate)
Create a virtual environment and then install nevergrad library using pip
virtualenv_create("r-reticulate")
py_install("nevergrad", pip = TRUE)
use_virtualenv("r-reticulate", required = TRUE)
Run
robyn3.8.1_run.R
Robyn uses Evoluationary Algorithm to identify the best models, and thus requires a minimum of 5 trials with 2000 iterations each.
Selcting from one among a dozen Robyn generated MMM model is a little bit of an art and relies on business knowledge.
Lets look at how well Facebook Prophet has done
Not bad! The blue dotted line shows that model is doing a good job of understanding the underlying patterns of our data.
- Its intresting to note that 41.1% of revenue can be attributed to our competitors marketing efforts, most likely an overall lift experienced from awareness generated by competitor marketing campaigns
- 8.28% Sales can be attributed to TV.
If you want to know what Adstock is this is a good primer https://towardsdatascience.com/market-mix-modeling-mmm-101-3d094df976f9
Once we have optimal model results plots and have chosen a model we run budget allocator, results will be plotted and saved under the same folder where the model plots had been saved. The result would look like the following:
Look at the Initial vs Optimized budget allocation. What model is telling us is that we can expect 28.1% increase in revenue just be re allocating the budget. Recommendation is to increase the budget for TV, Search and Print and reduce the budget for Radio and Facebook.