Going Beyond Dummy Variables for Seasonality Encoding in Marketing Mix Models (MMM)
Do you still encode seasonality through the old and ineffective 'Dummy Variable' method?
Capturing seasonality in MMM is one of the most trickiest thing to get right. Ineffective methods of encoding seasonality can often lead to great bias and inaccuracies in the model.
The Dummy Variable Method
Traditional approach in MMM often include relying on simple seasonality dummies, which may not adequately capture the complex and nuanced patterns observed in the real world marketing data.
Further this approach has the following problems
▪️P>N problem (more dimension problem):
Dummy variables significantly increase the dimensionality of the model, especially when dealing with granular time periods like weeks or days.
▪️Temporal Discontinuity:
Dummy variables treat each season or time period as entirely independent, ignoring the smooth transitions between them. For instance, see the above image, the transition from Dec to Jan is abrupt in dummy encoding, even though seasonality effects often change gradually.
▪️Multicollinearity:
As we all know Multicollinearity is MMM's Achilles heel. Dummy variables can exacerbate multicollinearity issues.
The Sine-Cosine method
Another approach to incorporating seasonality is to employ sine and cosine transformations. This approach encodes time features, like months or days of the year, into two continuous variables.
By using both sine and cosine functions with appropriate periods, we create two cyclical features. This combination allows the model to uniquely identify any point within the cycle, preventing ambiguities that might arise from using a single trigonometric function. A visualization of this idea is shown in the image above.
We can see that the months Dec and Jan are much closer together than Dec and June, even though in a linear encoding of the cyclicity, i.e., using a repeating vector of the numerical values of the months, the distance would be lesser for Dec and June !
The Radial Basis Function method (the most optimal)
For capturing nuanced seasonality patterns, Radial Basis Functions (RBF) offer a powerful solution.
RBFs use kernels to model seasonality.
The beauty of kernels is that it allows for the 'lingering effect' of seasonality to be captured accurately in comparison to the dummy variable method or sine-cosine method.
In summary:
Seasonality encoding is a critical component in MMM. While dummy variables have been the traditional approach, their limitations necessitate exploring better alternatives. Sine-cosine encoding offers a step forward, but for capturing complex, non-linear patterns, RBFs are the optimal method. By adopting advanced techniques like RBF, we believe marketers can achieve more accurate seasonality modeling, leading to better decision-making and resource allocation.
Through RBFs we have seen significant improvements in both bias mitigation and prediction error reduction. We will be releasing a research paper and case study on this soon. Stay tuned !!
Thanks for reading.
For consulting and help with MMM implementation, Click here