
Combined Conditional-Poisson/Poisson Hessian, Standalone (C++)
Source:R/RcppExports.R
get_cpoisson_combined_hessian_cpp.RdComputes the Hessian matrix of the log-likelihood of the combined KK
matched-pair conditional-Poisson (conditional-Binomial) plus reservoir
marginal-Poisson model documented in full at
fast_cpoisson_combined_with_var_cpp, at arbitrary
caller-supplied params_r (not necessarily the MLE). Internally reuses
the same score-and-information computation as
get_cpoisson_combined_score_cpp (a single shared routine
computes both at once) and returns the negative of the resulting information
matrix, i.e. the actual Hessian of the log-likelihood. Exported standalone —
independent of any optimizer run — for direct numerical diagnostics at a
specific parameter value.
Usage
get_cpoisson_combined_hessian_cpp(
yT_v_r,
n_k_v_r,
X_diff_v_r,
y_r_r,
w_r_r,
X_r_r,
params_r
)Arguments
- yT_v_r
Treated-subject outcome count per matched pair.
- n_k_v_r
Total (treated + control) outcome count per matched pair.
- X_diff_v_r
Covariate differences (treated minus control) between the members of each matched pair.
- y_r_r
Reservoir (unmatched) subjects' outcomes.
- w_r_r
Reservoir subjects' treatment indicators.
- X_r_r
Reservoir subjects' covariates.
- params_r
A numeric vector of model parameters at which to evaluate the Hessian.
Value
The Hessian matrix of the log-likelihood (the negative of the
information matrix) at params_r.
See also
get_cpoisson_combined_score_cpp for the corresponding
gradient at the same point; fast_cpoisson_combined_with_var_cpp
for the full model documentation.