bife: Efficiently fit binary choice models with fixed effects

View source: R/bife.R

bifeR Documentation

Efficiently fit binary choice models with fixed effects

Description

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.

Usage

bife(
  formula,
  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
)

Arguments

formula

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).

data

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

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".

beta_start

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

control

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

bias_corr

deprecated; see bias_corr.

tol_demeaning, iter_demeaning, tol_offset, iter_offset

deprecated; see bife_control.

Details

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.

Value

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

References

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

Examples


# Load 'psid' dataset
library(bife)
dataset <- psid

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


bife documentation built on Aug. 11, 2022, 5:11 p.m.