Clarification about DML marginal_effect
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 4.8k
- Forks
- 827
- PR merge metrics
- No merged PRs in 30d
Description
Thank you for such wonderful package.
I have categorical Treatment (value = 0, 1, 2) and I used DML.
The effect of the treatments is below.

Then I tried the marginal effect with base treatment = 0.

Now,
If I try other treatment value as base treatment such as 1 or 2. It does not change the output. Even whatever value I put as T, the output doesnot change.
dml_est.marginal_effect(T=1, X=dml_test_seg)
OR
dml_est.marginal_effect(T=2, X=dml_test_seg)
Am I missing something? Any help will be appreciated.
Thanks
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
Start at the DML estimator's marginal_effect(T, X) entry point and read its documentation and treatment encoding assumptions. Reproduce the calls with T=0, 1, and 2 using dml_test_seg, then confirm the expected behavior for categorical treatments and document or correct the differing outputs if needed.
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