bife {bife}R Documentation

Efficiently fit binary choice models with fixed effects


bife can be used to fit fixed effects binary choice models (logit and probit) based on an unconditional maximum likelihood approach. It is tailored for the fast estimation of binary choice models with potentially many individual fixed effects. The routine is based on a special pseudo demeaning algorithm derived by Stammann, Heiss, and McFadden (2016). The estimates obtained are identical to the ones of glm, but the computation time of bife is much lower.

Remark: The term fixed effect is used in econometrician's sense of having a full set of individual specific intercepts. All other parameters in the model are referred to as structural parameters.


  data = list(),
  model = c("logit", "probit"),
  beta_start = NULL,
  control = list(),
  bias_corr = NULL,
  tol_demeaning = NULL,
  iter_demeaning = NULL,
  tol_offset = NULL,
  iter_offset = NULL



an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted. formula must be of type y ~ x | id where the id refers to an individual identifier (fixed effect category).


an object of class "data.frame" containing the variables in the model.


the description of the error distribution and link function to be used in the model. For bife this has to be a character string naming the model function. Default is "logit".


an optional vector of starting values used for the structural parameters in the optimization algorithm. Default is zero for all structural parameters.


a named list of parameters for controlling the fitting process. See bife_control for details.


deprecated; see bias_corr.

tol_demeaning, iter_demeaning, tol_offset, iter_offset

deprecated; see bife_control.


bife drops all observations of cross-sectional units (individuals) with non-varying response. This can de done because these observations do not contribute to the identification of the structural parameters (perfect classification).

If bife does not converge this is usually a sign of linear dependence between one or more regressors and the fixed effects. In this case, you should carefully inspect your model specification.


The function bife returns a named list of class "bife".


Stammann, A., F. Heiss, and D. McFadden (2016). "Estimating Fixed Effects Logit Models with Large Panel Data". Working paper.


# Load 'psid' dataset
dataset <- psid

# Fit a static logit model
mod <- bife(LFP ~ I(AGE^2) + log(INCH) + KID1 + KID2 + KID3 + factor(TIME) | ID, dataset)

[Package bife version 0.7.2 Index]