insightsengineering / insightsengineering/bonsaiforest
[Feature Request]: Allow more flexibility in the specification of the prior in `horseshoe` [non-urgent]
- Dominant language
- R
- Stars
- 3
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
### Feature description
Currently, the priors for main effects and interactions are hard-coded as `"normal(0, 5)"` and `"horseshoe(1)"`. It would be great to add more flexibility in the specification.
Specifically, the following is requested:
- Priors for interactions: It would be great if the parameters in `horseshoe()` which are supported by `brms` could also be set in `bonsaiforest::horseshoe` (e.g. arguments `df`, `scale_global` etc.; [see full parameter list here](https://paulbuerkner.com/brms/reference/horseshoe.html)). In a second step, it would be nice if the `R2D2` prior (i.e. the other shrinkage prior supported by `brms`) was also supported.
- Main effects:
+ It could be useful to be able to set potentially different priors for the main treatment effect and for the main effects of the subgrouping variables, respectively. (I don't think one would ever want to apply shrinkage to the main treatment effect but in some instances, one may want to apply mild shrinkage to main effects of the subgrouping variables.)
+ It would also be nice if for the main effects of the subgrouping variables both the current dummy coding and the overparametrized one-hot encoding was supported.
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct.
### Contribution Guidelines
- [X] I agree to follow this project's Contribution Guidelines.
### Security Policy
- [X] I agree to follow this project's Security Policy.
Contributor guide
Assessment
This issue has not been assessed yet.