drm_family_dpq() returns the {d, p, q} closures and atom metadata for a
fitted model's model_type. It is the single source of truth that
fitted_distribution() and downstream consumers such as quantile
residuals, predict(type = "quantile"), and exceedance() route through, so
the public-to-native parameter conversion is not re-derived in each caller.
Details
These helpers currently cover 18 fitted model_type values
(status = "reference"): "gaussian", "student", "skew_normal",
"lognormal", "gamma", "tweedie", "beta", "zero_one_beta",
"beta_binomial", "binomial", "cumulative_logit", "poisson",
"zi_poisson", "nbinom2", "truncated_nbinom2", "hurdle_nbinom2",
"zi_nbinom2", and "biv_gaussian".
For "skew_normal", this support applies only to the density, CDF, and
quantile calculations. It does not establish fit quality; check_drmTMB()
continues to return diagnostic_hold for skew-normal fits.
"biv_gaussian" is MARGINAL-only: its
{d,p,q} describe one response's marginal N(mu_k, sigma_k) (exact,
independent of rho12), never the joint bivariate distribution – see
drm_family_dpq_biv_gaussian() and fitted_distribution()'s response
argument, which selects k. "biv_lognormal" and "biv_student" are
not supported by these helpers; their marginal density, CDF, quantile,
residual, and adequacy calculations have not been validated.
The d/p/q closures take (y_or_u, params), where params is a wide,
one-row-per-observation data frame. This signature is frozen (CP1): a
family needing extra per-row context beyond its dpars – binomial/
beta_binomial trials, cumulative_logit ordinal cutpoints (CP1..CPk),
truncation bounds, mixture weights – attaches it as an extra params
column inside fitted_distribution_params(), never by changing the
closure signature.