| name | add-family |
| description | Add a new drmTMB distribution family with likelihood, simulation, tests, and documentation. |
Add a Distribution Family
Use this skill when adding a new response family to drmTMB.
Required Outputs
- R family constructor.
- TMB density implementation or template integration.
- Simulation function.
- Parameter-recovery tests.
- Documentation and examples.
- Update to
docs/design/02-family-registry.md.
- Update to
docs/design/03-likelihoods.md.
- Update to
docs/design/19-family-link-contract.md when the family adds a
new link, fitted-response rule, variance rule, or parameter meaning.
Checklist
- Define response dimension: univariate or bivariate.
- Define distributional parameters.
- Define links and inverse links.
- Define native parameter meanings.
- Define what
predict(type = "response"), fitted(), and sigma() return.
- Define the variance rule or explain why no finite variance is available.
- Define valid parameter bounds.
- Write likelihood on numerically stable scales.
- Add starting-value strategy.
- Add simulation tests for typical and boundary cases.
- Add tests for link-scale predictions, response-scale predictions, and
fitted response summaries.
- Add user-facing documentation.
Do not add families just because they are available elsewhere. Families should
serve a clear distributional-regression use case.