What is the proper way to calculate ATT and ATC using EconML estimators?
Is there a way to calculate ATT and ATC using EconML estimators directly without using the DoWhy wrapper? In the below codes, I tried DoWhy wrapper but the ATT and ATC estimates do not look intuitive. The truthful values in my synthetic dataset are:
ATE=2.150835273467599 ATT=2.7547937877727984 ATC=2.0194467325766614
Ignoring the estimation error, I was expecting ATT to be greater than ATC, and ATE is in between. The DoWhy wrapper results did not show that.
estimator = LinearDML(model_y=RandomForestRegressor(), model_t=RandomForestRegressor(), random_state=123) estimator.fit(Y=pd_table[outcome], T=pd_table[treatment], W=pd_table[common_causes]) print(f"EconML ATE = {estimator.effect()[0]}") est1 = estimator.dowhy est1.fit(Y=pd_table[outcome], T=pd_table[treatment], W=pd_table[common_causes], target_units="ate") print(f"DoWhyWrapper ATE = {est1.estimate_.value}") est2 = estimator.dowhy est2.fit(Y=pd_table[outcome], T=pd_table[treatment], W=pd_table[common_causes], target_units="att") print(f"DoWhyWrapper ATT = {est2.estimate_.value}") est3 = estimator.dowhy est3.fit(Y=pd_table[outcome], T=pd_table[treatment], W=pd_table[common_causes], target_units="atc") print(f"DoWhyWrapper ATC = {est3.estimate_.value}")
--outputs-- EconML ATE = 2.6725369948454785 DoWhyWrapper ATE = 2.671863536095423 DoWhyWrapper ATT = 2.669885836212373 DoWhyWrapper ATC = 2.6640237888067766