# binom.reg: Binomial regression In Rfast2: A Collection of Efficient and Extremely Fast R Functions II

## Description

Binomial regression.

## Usage

 `1` ```binom.reg(y, ni, x, full = FALSE, tol = 1e-07, maxiters = 100) ```

## Arguments

 `y` The dependent variable; a numerical vector with integer values, 0, 1, 2,... The successes. `ni` A vector with integer values, greater than or equal to y. The trials. `x` A matrix with the data, where the rows denote the samples (and the two groups) and the columns are the variables. This can be a matrix or a data.frame (with factors). `full` If this is FALSE, the coefficients and the deviance will be returned only. If this is TRUE, more information is returned. `tol` The tolerance value to terminate the Newton-Raphson algorithm. `maxiters` The max number of iterations that can take place in each regression.

## Details

The difference from logistic regression is that in the binomial regression the binomial distribution is used and not the Bernoulli.

## Value

When full is FALSE a list including:

 `be` The regression coefficients. `devi` The deviance of the model.

When full is TRUE a list including:

 `info` The regression coefficients, their standard error, their Wald test statistic and their p-value. `devi` The deviance.

## Author(s)

Michail Tsagris <mtsagris@uoc.gr>

R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr>.

## References

McCullagh Peter and John A. Nelder. Generalized linear models. CRC Press, USA, 2nd edition, 1989.

` negbin.reg, hp.reg, ztp.reg `
 ```1 2 3 4 5``` ```x <- matrix(rnorm(100 * 2), ncol = 2) y <- rbinom(100, 20, 0.5) ## binary logistic regression ni <- rep(20, 100) a <- binom.reg(y, ni, x, full = TRUE) x <- NULL ```