get_glm_log_density_grad {catalytic} | R Documentation |
Compute Gradient of Log Density for GLM Families
Description
This function calculates the gradient of the log density with respect to the coefficients for a given GLM family based on the provided predictors, response variable, and weights.
Usage
get_glm_log_density_grad(family_string, X, Y, coefs, weights = 1)
Arguments
family_string |
Character. The GLM family to use. Options are |
X |
Matrix. The design matrix (predictors) for the GLM. |
Y |
Vector. The response variable. |
coefs |
Numeric vector. The coefficients for the GLM. |
weights |
Numeric vector. The weights for the GLM. Default is 1. |
Value
Numeric vector. The gradient of the log density with respect to the coefficients
[Package catalytic version 0.1.0 Index]