py-why / py-why/EconML

Price elasticity and small sample sizes

Open
#574 4 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

Hello and congratulations for this great package!

Currently I am working on a project which is related to price elasticity of demand. So, I have no X variable, and the only thing I would like to know is the price elasticity. If I have understood correctly, by taking the logs of Y(quantity) and T(price), the constant elasticity can be given by the CATE intercept by calling the const_marginal_effect. But I am not sure if my approach is correct, given also that my Y has a binomial distribution.

Another issue that I have, is that each time I run my model, I obtain highly or moderately different results, due to the small sample size (e.g. 800 rows). In order to tackle this issue, I have tried to use a repeated cross validation (sklearn) with the cv parameter of SparseLinearDML, but it produces an error. My first models are tree based. Can you propose a different approach, or give me any advice on how to tackle this issue?

Thanks a lot!

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

Read the SparseLinearDML documentation and reproduce the reported cv failure using the small-sample, tree-based setup described. Clarify whether the requested elasticity interpretation and cross-validation approach are supported; done means documenting a reproducible recommendation or a verified explanation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, scikit-learn
Domain
machine-learning
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.