fast_logistic_regression {fastLogisticRegressionWrap} | R Documentation |
FastLR Wrapper
Description
Returns most of what you get from glm
Usage
fast_logistic_regression(
Xmm,
ybin,
drop_collinear_variables = FALSE,
lm_fit_tol = 1e-07,
do_inference_on_var = "none",
Xt_times_diag_w_times_X_fun = NULL,
sqrt_diag_matrix_inverse_fun = NULL,
num_cores = 1,
...
)
Arguments
Xmm |
The model.matrix for X (you need to create this yourself before) |
ybin |
The binary response vector |
drop_collinear_variables |
Should we drop perfectly collinear variables? Default is |
lm_fit_tol |
When |
do_inference_on_var |
Which variables should we compute approximate standard errors of the coefficients and approximate p-values for the test of
no linear log-odds probability effect? Default is |
Xt_times_diag_w_times_X_fun |
A custom function whose arguments are |
sqrt_diag_matrix_inverse_fun |
A custom function that returns a numeric vector which is square root of the diagonal of the inverse of the inputted matrix. Its arguments are |
num_cores |
Number of cores to use to speed up matrix multiplication and matrix inversion (used only during inference computation). Default is 1.
Unless the number of variables, i.e. |
... |
Other arguments to be passed to |
Value
A list of raw results
Examples
library(MASS); data(Pima.te)
flr = fast_logistic_regression(
Xmm = model.matrix(~ . - type, Pima.te),
ybin = as.numeric(Pima.te$type == "Yes")
)