Two-Way Fixed Effects (TWFE) models are a workhorse in causal inference, but applying them to interaction effects — such as product color × search query — introduces subtle pitfalls that can silently bias your estimates. This article walks through how to set up TWFE for interaction effects in an e-commerce search setting, where the pitfalls lurk, and how to build a more robust estimation strategy.
Why Product Color × Search Query?
In fashion e-commerce, color is a first-order signal. A user searching for "linen shirt" behaves very differently from one searching for "black linen shirt"...