View source: R/negbin_helpers.R
| negbin_schur_correction | R Documentation |
Computes the Schur complement correction to account for uncertainty in
estimating \theta. Structure is identical to
weibull_schur_correction: the joint information is
partitioned into (\boldsymbol{\beta}, \theta) blocks and the
correction is -\mathbf{I}_{\beta\theta}
I_{\theta\theta}^{-1}\mathbf{I}_{\beta\theta}^{\top}.
negbin_schur_correction(
X,
y,
B,
dispersion,
order_list,
K,
family,
observation_weights
)
X |
List of partition design matrices. |
y |
List of partition response vectors. |
B |
List of partition coefficient vectors. |
dispersion |
Scalar shape parameter |
order_list |
List of observation indices per partition. |
K |
Number of knots. |
family |
Family object. |
observation_weights |
Observation weights. |
The cross-derivative (score of \eta_i w.r.t. \theta) is
\frac{\partial^2 \ell}{\partial \eta_i \partial \theta}
= \frac{(y_i - \mu_i)\mu_i}{(\theta + \mu_i)^2}
The second derivative of the log-likelihood w.r.t. \theta is
I_{\theta\theta} = -\sum_i w_i \bigl[
\psi'(y_i + \theta) - \psi'(\theta) +
\frac{1}{\theta} - \frac{2}{\mu_i + \theta} +
\frac{y_i + \theta}{(\mu_i + \theta)^2}\bigr]
where \psi' is the trigamma function.
List of K+1 correction matrices, with 0 for empty
partitions.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.