
Analytical Jacobian for empirical likelihood
Source:R/engines_el_impl_jacobian.R
el_build_jacobian.RdAnalytical Jacobian for empirical likelihood
Usage
el_build_jacobian(
family,
missingness_model_matrix,
auxiliary_matrix,
respondent_weights,
N_pop,
n_resp_weighted,
mu_x_scaled
)Details
Builds the block Jacobian \(A = \partial F/\partial \theta\) for the EL system with \(\theta = (\beta, z, \lambda_x)\) and \(z = \operatorname{logit}(W)\). Blocks follow Qin, Leung, and Shao (2002, Eqs. 7-10). The derivative with respect to the linear predictor for the missingness (response) model uses the Bernoulli score form \(\partial/\partial\eta\, \log w(\eta) = \mu.\eta(\eta)/w(\eta)\) with link-inverse clipping. Denominator guards are applied consistently when forming terms depending on \(D_i(\theta)\).
Guarding policy (must remain consistent across equations/Jacobian/post):
Cap \(\eta\):
eta <- pmax(pmin(eta, get_eta_cap()), -get_eta_cap()).Compute
w <- family$linkinv(eta)and clip to[1e-12, 1 - 1e-12]when used in ratios.Denominator floor:
Di <- pmax(Di_raw, nmar_get_el_denom_floor()). Terms that depend ond(1/Di)/d(.)are multiplied byactive = 1(Di_raw > floor)to match the clamped equations.