Computes the capped linear predictor, response probabilities, derivatives, and stable scores with respect to the linear predictor for a given family. This helper centralizes the numerically delicate pieces (capping, clipping, Mills ratios, and score derivatives) and is used consistently across the EL equation system and analytical Jacobians for both IID and survey designs.
el_core_eta_state(family, eta_raw, eta_cap)A list with components:
etaCapped linear predictor.
wMean function family$linkinv(eta).
w_clippedw clipped to [1e-12, 1-1e-12] for use in ratios.
mu_etaDerivative family$mu.eta(eta).
d2muSecond derivative family$d2mu.deta2(eta) when available, otherwise NULL.
s_etaScore with respect to eta, using stable logit/probit forms where possible.
ds_eta_detaDerivative of s_eta with respect to eta when d2mu is available, otherwise NULL.
List-like response family bundle (see logit_family() and
probit_family()).
Numeric vector of unconstrained linear predictors.
Scalar cap applied symmetrically to eta_raw.