The default normal conditional-density estimator for HDR non-overlap
Source:R/hdr-density.R
hdr_density_normal.Rdhdr_density_normal() builds the default conditional-density estimator used
by check_hdr() and check_hdr_seq(). It fits a linear model of the
exposure on the covariates, treats the conditional density as Gaussian with
the model's residual standard deviation, and supplies a closed-form HDR
threshold.
Details
The estimator fits lm(exposure ~ covariates), recovering fitted means
\(\hat{\mu}(l)\) and a homoskedastic residual standard deviation
\(\hat{\sigma}\). The conditional density is
\(\hat{f}(a \mid l) = \mathrm{dnorm}(a; \hat{\mu}(l), \hat{\sigma})\). Its
HDR at mass mass is a symmetric interval around \(\hat{\mu}(l)\), so the
density cutoff is the closed form
$$f_\alpha = \mathrm{dnorm}(z) / \hat{\sigma}, \qquad
z = \Phi^{-1}\!\left(\frac{1 + \mathrm{mass}}{2}\right).$$
Membership of a target a in the HDR reduces to the interval test
\(|a - \hat{\mu}(l)| \le z\,\hat{\sigma}\), and the non-overlap ratio at
a is the fraction of fitted means more than \(z\,\hat{\sigma}\) from a.
Because the working model is a single Gaussian, this estimator detects
mean-shift support gaps, where a stratum's supported dose moves away from a
target, but not multimodal gaps: a hole between two modes of the true
conditional density is filled by the fitted normal and reported as
supported. Supply a flexible estimator through new_hdr_density() when
multimodal structure is expected.