get_glm_log_density_grad | R Documentation |
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.
get_glm_log_density_grad(family_string, X, Y, coefs, weights = 1)
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. |
Numeric vector. The gradient of the log density with respect to the coefficients
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.