A function that computes the gradient of the for a logistic
regression model. Used by optim
on occasion.
grad(beta, Y, X)
beta | A vector of coefficients in a logistic glm |
---|---|
Y | The outcome |
X | The design matrix |
Numeric vector of the gradient of the parameter vector.