Skip to contents

Chamberlain's conditional (fixed-effects) logit, whose likelihood conditions on each unit's number of ones (denominator by dynamic programming), and random-effects logit or probit with a normal unit effect integrated by Gauss-Hermite quadrature; maximised by BFGS with standard errors from the numerical Hessian.

Usage

PanelBinaryChoice(
  y,
  X,
  group,
  model = c("fe_logit", "re_logit", "re_probit"),
  n_quad = 30
)

Arguments

y

Binary outcomes.

X

Covariate matrix (no intercept column).

group

Unit labels.

model

"fe_logit", "re_logit" or "re_probit".

n_quad

Quadrature nodes.

Value

list(coef, se, sigma, loglik, n_units, converged).

References

Chamberlain, G. (1980). Analysis of covariance with qualitative data. Review of Economic Studies 47, 225-238. Butler, J. S. and Moffitt, R. (1982). A computationally efficient quadrature procedure for the one-factor multinomial probit model. Econometrica 50, 761-764.

Examples

PanelBinaryChoice(c(0, 1, 1, 0, 0, 1), matrix(c(0, 1, 2, 0.5, 0.2, 1.5)), c(1, 1, 1, 2, 2,
  2))$n_units
#> [1] 2