A function that computes the gradient of the for a logistic
regression model with an offset term. Used by optim on
occasion.
grad_offset(beta, Y, H, offset = NULL)
| beta | A vector of coefficients in a logistic glm |
|---|---|
| Y | The outcome |
| H | The covariate matrix |
| offset | The offset vector |
Numeric vector of the gradient of the parameter vector.