Skip to contents

Computes the observed information matrix \(H_{\mathrm{obs}}\) for the fixed effects of a hurdle Beta-Binomial model. Uses a block-diagonal structure:

Usage

compute_H_obs(fit, scores = NULL)

Arguments

fit

An object of class "hbb_fit".

scores

Optional \(N \times D\) score matrix (as from compute_score_matrix()). If NULL, computed internally.

Value

A list with components:

H_obs

Numeric matrix (\(D \times D\)). Block-diagonal observed information.

H_obs_inv

Numeric matrix (\(D \times D\)). Inverse of H_obs (the bread matrix).

H_ext

Numeric matrix (\(P \times P\)). Extensive-margin Fisher information block.

H_int

Numeric matrix (\((P+1) \times (P+1)\)). Intensive + kappa block from information identity.

ridge_applied

Logical. Whether ridge regularisation was needed.

Details

  • Extensive margin (alpha block, \(P \times P\)): analytic Fisher information from logistic regression.

  • Intensive + kappa block (\((P+1) \times (P+1)\)): empirical information identity using posterior mean scores.

Extensive margin (H_ext)

For the base weighted model: $$H_{\mathrm{ext}} = \sum_{i=1}^N \tilde{w}_i\, q_i (1-q_i)\, X_i X_i^\top$$ where \(q_i = \mathrm{logit}^{-1}(X_i^\top \hat{\alpha})\).

For SVC models, the linear predictor includes state random effects: \(q_i = \mathrm{logit}^{-1}(X_i^\top \hat{\alpha} + X_i^\top \hat{\delta}^{\mathrm{ext}}_{s[i]})\).

Intensive margin (H_int)

The zero-truncated Beta-Binomial Hessian is analytically complex, so we use the information identity: $$H_{\mathrm{int}} = \sum_{i=1}^N \tilde{w}_i\, s_i^{\mathrm{int}} (s_i^{\mathrm{int}})^\top$$ where \(s_i^{\mathrm{int}} = (s_{\beta,i}, s_{\kappa,i})^\top\) is the \((P+1)\)-dimensional intensive score at the posterior mean.