# brglm2 v0.6.2

0

0th

Percentile

## Bias Reduction in Generalized Linear Models

Estimation and inference from generalized linear models based on various methods for bias reduction and maximum penalized likelihood with powers of the Jeffreys prior as penalty. The 'brglmFit' fitting method can achieve reduction of estimation bias by solving either the mean bias-reducing adjusted score equations in Firth (1993) <doi:10.1093/biomet/80.1.27> and Kosmidis and Firth (2009) <doi:10.1093/biomet/asp055>, or the median bias-reduction adjusted score equations in Kenne et al. (2016) <arXiv:1604.04768>, or through the direct subtraction of an estimate of the bias of the maximum likelihood estimator from the maximum likelihood estimates as in Cordeiro and McCullagh (1991) <http://www.jstor.org/stable/2345592>. See Kosmidis et al (2019) <doi:10.1007/s11222-019-09860-6> for more details. Estimation in all cases takes place via a quasi Fisher scoring algorithm, and S3 methods for the construction of of confidence intervals for the reduced-bias estimates are provided. In the special case of generalized linear models for binomial and multinomial responses (both ordinal and nominal), the adjusted score approaches return estimates with improved frequentist properties, that are also always finite, even in cases where the maximum likelihood estimates are infinite (e.g. complete and quasi-complete separation). 'brglm2' also provides pre-fit and post-fit methods for detecting separation and infinite maximum likelihood estimates in binomial response generalized linear models.

# brglm2

brglm2 provides tools for the estimation and inference from generalized linear models using various methods for bias reduction (Kosmidis, 2014). brglm2 supports all generalized linear models supported in R, and provides methods for multinomial logistic regression (nominal responses) and adjacent category models (ordinal responses).

Reduction of estimation bias is achieved by solving either the mean-bias reducing adjusted score equations in Firth (1993) and Kosmidis & Firth (2009) or the median-bias reducing adjusted score equations in Kenne et al (2016), or through the direct subtraction of an estimate of the bias of the maximum likelihood estimator from the maximum likelihood estimates as prescribed in Cordeiro and McCullagh (1991). Kosmidis et al (2019) provides a unifying framework and algorithms for mean and median bias reduction for the estimation of generalized linear models.

In the special case of generalized linear models for binomial and multinomial responses (both ordinal and nominal), the adjusted score equations return estimates with improved frequentist properties, that are also always finite, even in cases where the maximum likelihood estimates are infinite (e.g. complete and quasi-complete separation). See, Kosmidis & Firth (2019) for the proof of the latter result in the case of mean bias reduction for logistic regression (and, for more general binomial-response models where the likelihood is penalized by a power of the Jeffreys invariant prior).

brglm2 also provides pre-fit and post-fit methods for the detection of separation and of infinite maximum likelihood estimates in binomial response generalized linear models (see ?detect_separation and ?check_infinite_estimates).

### Installation

Install the development version from github:

# install.packages("devtools")
devtools::install_github("ikosmidis/brglm2")


### Solving adjusted score equations using quasi-Fisher scoring

The workhorse function in brglm2 is brglmFit, which can be passed directly to the method argument of the glm function. brglmFit implements a quasi Fisher scoring procedure, whose special cases result in a range of explicit and implicit bias reduction methods for generalized linear models. Bias reduction for multinomial logistic regression (nominal responses) can be performed using the function brmultinom, and for adjacent category models (ordinal responses) using the function bracl. Both brmultinom and bracl rely on brglmFit.

The iteration vignette and Kosmidis et al (2019) present the iteration and give mathematical details for the bias-reducing adjustments to the score functions for generalized linear models.

The classification of bias reduction methods into explicit and implicit is as given in Kosmidis (2014).

### References and resources

brglm2 was presented by Ioannis Kosmidis at the useR! 2016 international conference at University of Stanford on 16 June 2016. The presentation was titled "Reduced-bias inference in generalized linear models" and can be watched online at this link.

Motivation, details and discussion on the methods that brglm2 implements are provided in

Kosmidis, I, Kenne Pagui, E C, Sartori N. (2017). Mean and median bias reduction in generalized linear models. Statistics and Computing 30, 43–59. arXiv, arXiv:1710.11217.

## Functions in brglm2

 Name Description mis A link-glm object for misclassified responses in binomial regression models predict.bracl Predict method for bracl fits predict.brmultinom Predict method for brmultinom fits residuals.brmultinom Residuals for multinomial logistic regression and adjacent category logit models brglmControl Auxiliary function for glm fitting using the brglmFit method. summary.brglmFit summary method for brglmFit objects vcov.brglmFit Return the variance-covariance matrix for the regression parameters in a brglmFit object stemcell Opinion on Stem Cell Research and Religious Fundamentalism lizards Habitat preferences of lizards detect_separation Method for glm that tests for data separation and finds which parameters have infinite maximum likelihood estimates in generalized linear models with binomial responses detect_separation_control Auxiliary function for the glm interface when method is detect_separation. endometrial Histology grade and risk factors for 79 cases of endometrial cancer check_infinite_estimates Generic method for checking for infinite estimates brglm2 brglm2: Bias Reduction in Generalized Linear Models coalition Coalition data confint.brglmFit Method for computing confidence intervals for one or more regression parameters in a brglmFit object bracl Bias reduction for adjacent category logit models for ordinal responses using the Poisson trick. brglmFit Fitting function for glm for reduced-bias estimation and inference check_infinite_estimates.glm A simple diagnostic of whether the maximum likelihood estimates are infinite brmultinom Bias reduction for multinomial response models using the Poisson trick. alligators Alligator food choice data No Results!