generate_up_down_geolift_data#
- causalpy.data.simulate_data.generate_up_down_geolift_data(seed=8927, *, n_pre=40, n_post=12, n_control=6, n_up=2, n_down=2, effect_scale=150.0, delivery_fraction=0.9)[source]#
Simulate weekly revenue and two-channel spend for an up/down/control test.
The tested channel is
search. Its realized change starts at the common intervention date;displayis unchanged. Treated business-as-usual revenue is a convex combination of control revenue plus idiosyncratic noise. Control geos span smaller and larger sizes than treated geos, producing correspondingly lower and higher baseline spend and revenue. Effects are differences in geo-specific saturating response to realized and baseline search spend, with no carryover. Seteffect_scale=0for a no-effect case.