# NOT RUN {
data = data.frame(y = c(0, 0, 1),
pois_y = c(4, 1, 0),
x2 = c(-2.19021287072066,
-0.344307138450805, 3.47215796952745),
x1 = c(-0.263859503846267,
-0.985160029707486, 0.227262373184513))
gradient_value(data = data, formula = y ~ x1 + x2,
family = "binomial")
gradient_value(data = data, formula = pois_y ~ x1 + x2,
family = "poisson")
data = data.frame(y = c(0, 0, 1),
pois_y = c(4, 1, 0),
x2 = c(-2.19021287072066,
-0.344307138450805, 3.47215796952745),
x1 = c(-0.263859503846267,
-0.985160029707486, 0.227262373184513))
use_glm_gradient_value(data = data, formula = y ~ x1 + x2,
family = binomial(link = "probit"))
# }
Run the code above in your browser using DataLab