Interval-censored log-likelihood contribution
Source:R/likelihood-multiphase.R
dot-hzr_logl_interval.RdThe single place the interval-censored contribution is written. Both
.hzr_logl_multiphase() and the finite-difference closure inside
.hzr_gradient_multiphase() delegate here, so the optimizer cannot step by
the gradient of a different objective than the one it evaluates.
Usage
.hzr_logl_interval(
cumhaz_lower,
cumhaz_upper,
lower,
upper,
weights,
objective = c("likelihood", "sas")
)Arguments
- cumhaz_lower
Cumulative hazard at the interval lower bounds, \(\Lambda(l)\).
- cumhaz_upper
Cumulative hazard at the interval upper bounds, \(\Lambda(u)\).
- lower
Interval lower bounds. Used only by
objective = "sas".- upper
Interval upper bounds. Used only by
objective = "sas".- weights
Case weights. In a SAS parity run these are the ICENSOR variable, which is a weight (a death count in an aggregated study), not merely an indicator.
- objective
"likelihood"for the interval probability – the default, and the only statistically consistent form – or"sas"for the interval-mean-hazard density termPROC HAZARDaccumulates. Seeinst/dev/SAS-INTERVAL-OBJECTIVE-DESIGN.md.