pymc-labs / pymc-labs/CausalPy
RDD: think about centering of running variable and priors
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 115
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 11
Description
People often centre the running variable, such that the threshold is at zero. This will change the parameters which is very relevant for the Bayesian model because of the priors. The advantages of centering the running variable are that:
- the parameters are easier to interpret
- the coefficient for the main effect of treatment is always(?) equal to the discontinuity at threshold.
While we might not escape the need for custom priors (when the time comes; for example on the intercept parameter), centering the running variable might make things easier. So need to think about doing this automatically, or simply making the user aware of the issues. If we do, then the treatment_threshold kwarg should be removed and hard-wired to zero.
My initial feeling is to not enforce centering, rely upon the users understanding, and provide the information in the docs and examples.
Contributor guide
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
No file or test is named. Start by locating the RDD implementation and the handling of the treatment_threshold kwarg, then review the documentation and examples for running-variable centering and priors. Done means the centering behavior is decided and reflected in the implementation or documentation, with the relevant examples or tests updated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100