facebookincubator / GeoLift

GeoLift is an end-to-end geo-experimental methodology based on Synthetic Control Methods used to measure the true incremental effect (Lift) of ad campaign.
https://facebookincubator.github.io/GeoLift/
MIT License
175 stars 54 forks source link

Usage of Covariates #168

Closed ar-asur closed 1 month ago

ar-asur commented 1 year ago

Hi,

I am trying to use Geolift to measure a test. I have treatment and control set of locations and trying to add covariates and getting the following error Error in extract_covariates(form, unit, time, t_int, data, cov_agg): The following covariates have no variation across units: x1, x2, x3, x4 x5. This comes from augsynth package and I am not able to understand the error as I checked my covariates and they do have good amount of variance.

I do have following questions:

Any suggestions would be helpful, thanks!

kesemadi commented 1 month ago

Hi,

Covariates that do not vary across locations within the test and control groups are not helpful in predicting counterfactuals because they do not provide any additional information to distinguish between different units. The covariates should ideally vary both across time and across units. If they only vary over time but remain constant across locations, the model cannot leverage these covariates to improve the prediction of the counterfactuals.

Regarding your second question, the covariate should be added as another column in your data input: location, time, Y, covariate