brlr {brlr}R Documentation

Bias-reduced Logistic Regression

Description

Fits a logistic regression by maximum penalized likelihood, in which the penalty function is the Jeffreys invariant prior. This removes the O(1/n) term from the asymptotic bias of estimated coefficients (Firth, 1993), and always yields finite estimates and standard errors (whereas the MLE is infinite in situations of complete or quasi-complete separation).

Usage

brlr(formula, data = NULL, offset, weights, start, ..., subset,
   dispersion = 1, na.action = na.omit, contrasts = NULL,
   x = FALSE, br = TRUE, control = list(maxit = 200))

Arguments

formula a model formula as for glm, or an object of class glm
data an data frame as for glm
offset an optional vector as for glm
weights an optional vector as for glm
start an optional set of starting values (of the model coefficients) for the optimization
... further arguments passed to or from other methods
subset an optional vector specifying a subset of observations to be used in the fitting process
dispersion an optional parameter for over- or under-dispersion relative to binomial variation – default is 1
na.action a function which indicates what should happen when the data contain `NA's. The default is set by the na.action setting of options, and is na.fail if that is unset. The ``factory-fresh'' default is na.omit.
contrasts an optional list. See the contrasts.arg of model.matrix.default.
x should the model matrix be included in the resultant object?
br a logical switch indicating whether the bias-reducing penalty is applied; default is TRUE
control as for optim

Details

brlr has essentially the same user interface as glm(family=binomial, ...) — see the example below.

Value

A model object of class brlr, with components

coefficients as for glm
deviance as for glm
penalized.deviance deviance minus 2*logdet(Fisher information)
fitted.values as for glm
linear.predictors as for glm
call as for glm
formula as for glm
convergence logical, did the optimization converge?
niter number of iterations of the optimization algorithm (BFGS via optim)
df.residual as for glm
df.null as for glm
model as for glm
y the observed binomial proportions, as for glm
family a family object, binomial with logistic link, as for glm
offset as for glm
prior.weights as for glm
terms as for glm
dispersion as for glm; the dispersion argument if supplied, otherwise 1
bias.reduction logical, the value of argument br
leverages the diagonal elements of the model's ``hat'' matrix
qr as for glm
rank as for glm
FisherInfo the estimated Fisher information matrix
contrasts as for glm
xlevels as for glm
residuals as for glm
data as for glm
boundary as for glm; but always FALSE
x if x = TRUE is specified
control the control list as used in the call to optim

Note

1. Methods specific to the brlr class of models are

Others are inherited from the glm class.

2. The results of the bias-reduced fit typically have regression coefficients slightly closer to zero than the maximum likelihood estimates, and slightly smaller standard errors. (In logistic regression, bias reduction is achieved by a slight shrinkage of coefficients towards zero; thus bias reduction also reduces variance.) The difference is typically small except in situations of sparse data and/or complete separation. See also Heinze and Schemper (2002), Zorn (2005).

Author(s)

David Firth, d.firth@warwick.ac.uk

References

Firth, D. (1993) Bias reduction of maximum likelihood estimates. Biometrika 80, 27–38.

Firth, D. (1992) Bias reduction, the Jeffreys prior and GLIM. In Advances in GLIM and Statistical Modelling, Eds. L Fahrmeir, B J Francis, R Gilchrist and G Tutz, pp91–100. New York: Springer.

Heinze, G. and Schemper, M. (2002) A solution to the problem of separation in logistic regression. Statistics in Medicine 21, 2409–2419.

Zorn, C (2005). A solution to separation in binary response models. Political Analysis 13, 157–170.

Examples

## Habitat preferences of lizards, from McCullagh and Nelder (1989, p129);
## this reproduces the results given in Firth (1992).
##
## First the standard maximum-likelihood fit:
data(lizards)
glm(cbind(grahami, opalinus) ~ height + diameter + light + time,
    family = binomial, data=lizards)
## Now the bias-reduced version:
brlr(cbind(grahami, opalinus) ~ height + diameter + light + time,
    data=lizards)

[Package brlr version 0.8-9 Index]