py-why / py-why/EconML

Significance

Open
#452 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
4.8k
Forks
827
PR merge metrics
No merged PRs in 30d

Description

Hi all,

I am using the following for estimating cross and own elasticities for products within molecules on a panel database:

est = LinearDML(model_y= LassoCV(cv=[(fold00, fold11), (fold11, fold00)], tol=0.0001,n_alphas = 1000,max_iter=100000), 
                                       model_t= MultiTaskElasticNetCV(cv=[(fold00, fold11), (fold11, fold00)],n_alphas = 1000,max_iter=100000),
                                       cv = [(fold0, fold1), (fold1, fold0)],
                                       linear_first_stages=True, fit_cate_intercept=False)

Now, focusing on just the cross elasticities, the problem here is that out of the 2500 cross estimates that I compute, only 290 are significant. Moreover more than a half of such estimates are negative, which looks strange to me.

Observations on the data I have selected: since the algorithm imposes (at least on panels) that the number of periods for which products within groups (molecules) are observed is the same for all, I am deleting the "excess time periods" with respect to the product having a lower number of time periods. This means for instance, that if a molecule has 3 products, one with 14 quarters, another with 18, and the latter with 40, I am basically randomly deleting 4 periods for prod.2 and 26 periods to prod.3 in a way that, however, intersections between periods remains. So, it may be the case that I have too few products to compute cross elasticity, but, still, I am not convinced

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file or test is identified; start with the shown LinearDML configuration and the documentation for panel-data requirements and cross elasticities. Done would require a reproducible example and a confirmed expected result before a code change can be scoped.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.