Error message with multiple treatments
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 4.8k
- Forks
- 827
- PR merge metrics
- No merged PRs in 30d
Description
I want to estimate a model with 2 treatment variables.
When executing:
est_linear_lasso.fit(Y.values.ravel(), T, X = X[category_id_varlist], W = W, inference = 'statsmodels')
where Y, T, X, and W are data frames and T has 2 columns, I get the error message :
Exception: Data must be 1-dimensional
Note that everything is fine when having only 1 treatment variable (and writing T.values.ravel() in the above code).
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
Reproduce the reported fit call with Y, T, X, and W as data frames and T containing two treatment columns, then compare it with the single-treatment case using a flattened T. Trace the treatment-shape handling reached by est_linear_lasso.fit and confirm that the resulting behavior for multiple treatments is resolved and covered by an appropriate regression test.
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
- Mostly clear
- Newbie friendliness
- 30/100