What is the proper way to calculate ATT and ATC using EconML estimators?
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 4.8k
- Forks
- 827
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The entry points mentioned are LinearDML and its dowhy wrapper, with target_units set to "ate", "att", and "atc"; start by checking their API documentation and target-unit semantics. Done means establishing whether the reported values are expected for the synthetic data and documenting or correcting the discrepancy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100