Computes the capped linear predictor, response probabilities, derivatives, and stable scores with respect to the linear predictor for a given family. Centralizes the numerically delicate pieces (capping, clipping, score derivatives) to be reused in EL equations and jacobian.
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.
ds_eta_detaDerivative of s_eta with respect to eta
when d2mu is available, otherwise NULL.
Response family.
Numeric vector of unconstrained linear predictors.
Scalar cap applied symmetrically to eta_raw.