View source: R/negbin_helpers.R
| negbin_glm_weight_function | R Documentation |
Computes working weights for the NB2 information matrix used by
lgspline when updating \mathbf{G} after obtaining constrained
estimates.
negbin_glm_weight_function(
mu,
y,
order_indices,
family,
dispersion,
observation_weights
)
mu |
Predicted values |
y |
Observed counts. |
order_indices |
Observation indices in partition order. |
family |
NB family object (unused, for interface compatibility). |
dispersion |
Shape parameter |
observation_weights |
Observation weights. |
The IRLS weight for NB2 with log link is
W_i = w_i \mu_i \theta / (\theta + \mu_i)
Falls back to observation weights when natural weights are degenerate.
Numeric vector of working weights, length N.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.