Description Usage Arguments Value Examples
View source: R/package_contents.R
Estimate the update gradient value
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
beta |
current beta value, leave |
data |
dataset to get gradient value from |
formula |
model formula to fit, with tilde syntax |
family |
generalized linear model family, see |
iteration_number |
number of fitting iteration, used for tracking |
shuffle_rows |
should the rows of the dataset be permuted, so as to decrease privacy concerns |
link |
link function to use with family |
A list of estimated values, including the gradient,
sample size, iteration number, covariance matrix (A_mat
),
number of samples with non-zero weights, the sum of the dispersion
values (for overdispersion estimates), and a vector of values
for combining to create the population gradient (u
), with length
of the number of beta values
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 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"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.