BIreg
function performs a regression model linking by a logistic function the probability paramater of a binomial distribution with a linear predictor that consists of the given covariates. Following the exponential family theory, the binomial distribution with dispersion parameter has the following log-likelihood function:
$$l=[y*log(p/(1-p))+m*log(1-p)]/phi+c(y,phi)$$
where \(c()\) is a known function. If we any dispersion parameter is not considered the usual density function of the binomial distribution will be used,
$$l=y*log(p)+(m-y)*log((1-p)).$$
As explained before we link the probablity parameter with the given covariates by
$$logit(p)=log(p/(1-p))=x_i'*beta$$
where \(beta\) are the regression coefficients and \(x_i\) is the \(i\)th row of a full rank design matrix \(X\) composed by the given covariables.
The estimation of the regression parameters \(beta\) is done via maximum likelihood approach, where the iterative weighted least square (IWLS) method is applied.
If disp
is TRUE, a dispersion parameter will be added in the binomial distribution and, consequently, the method will deal with the general definition of the log-likelihood formula, otherwise the usual and simpler one will be used. In case the dispersion parameter is included, the estimation will be done with a bias-corrected method of moments:
$$phi=Var[y]/[(m-q)*p*(1-p)]$$
where \(q\) is the number of estimated regression paramters, and \(p\) is the estimated probability parameter.
The deviance of the model is defined by the ratio between the log-likelihood of the estimated model and saturated or null model. If the dispersion paramter is included the scaled deviance is obtained dividing the deviance by the dispersion parameter.