
Weighted Log-Link (Relative-Risk) Binomial Regression Hessian, Standalone (C++)
Source:R/RcppExports.R
get_log_binomial_regression_weighted_hessian_cpp.RdComputes the observation-weighted Hessian matrix of the weighted log-likelihood
of the constrained log-link binomial regression model documented in full at
fast_log_binomial_regression_cpp, at arbitrary caller-supplied
beta (not necessarily the MLE), with each observation's contribution
multiplied by weights_r[i], via a numerical (central
finite-difference 4-point stencil, step \(h = 10^{-4}\)) approximation —
not an analytic second derivative. Exported standalone — independent of any
optimizer run — for direct numerical diagnostics at a specific parameter value.
Value
The finite-difference-approximated weighted Hessian matrix at beta.
A numeric matrix representing the weighted Hessian.
See also
get_log_binomial_regression_weighted_score_cpp for
the corresponding weighted gradient at the same point;
get_log_binomial_regression_hessian_cpp for the unweighted
version; fast_log_binomial_regression_cpp for the full model
documentation.