generate_geolift_data#
- causalpy.data.simulate_data.generate_geolift_data(seed=None)[source]#
Generate synthetic geolift data using a latent factor model.
Each unit’s time series is a linear combination of K=3 shared seasonal factors (GP draws) with unit-specific loadings, plus observation noise. Most countries share positive loadings and are therefore positively correlated, while 2 “contrarian” countries carry a negative loading on one factor, making them negatively correlated with the majority. The treated unit (Denmark) is a Dirichlet-weighted combination of the positively-loaded countries only, so it is well-reconstructed by good donors but poorly correlated with the contrarian ones.
This mirrors the latent factor DGP used to motivate synthetic control methods in Abadie (2010, 2021).