# Logistic regression: fixed effects for firms, countries & years

I am trying to use logistic regression on a sample of 20,000+ firms across 50+ countries, from 2000-2010. Do I need to use logistic regression with fixed effects for year and firm + dummy variables for countries?

Firm Failure (fail = 1, otherwise 0) = $f(X_1, X_2, X_3, X_4, X_5, X_6)$
$X_1$ and $X_2$ are country-level independent variables
$X_3$ and $X_4$ are firm-level independent variables
$X_5$ is a country-level independent variables variable (control variable)
$X_6$ is a firm-level independent variable (control variable)

Logistic regression model for sample firms $i$ and country $c$: $$\text{Fit} = β_0 + β_1X_1c + β_2X_2c + β_3X_{3i} + β_4X_{4i} + β_5X_5c + β_6X_{6i} + ε$$

• Seems to me you need a multi-level model to account for the nesting of firms in countries. But it might be more complex than that, as the nesting may be partial (since many firms are international). – Peter Flom - Reinstate Monica Sep 29 '12 at 19:58

If firms are associated with one country, then if you have firm fixed effects you don't need country dummies as well. In fact, you can't estimate both, since the country effect (unless interacted with a time dummy) is time invariant, so it is collinear with the firm fixed effect. Thus, you can't estimate both. But that is not a problem, because the country effect is already captured by the firm fixed effect.

Should you include year fixed effects? Depends on your data and research question, but if you want to control for year effects that affect all firms in all countries, then you should include them. For example, if there were a global macroeconomic shock in a year, then year fixed effects would be one way to control for it.

When you implement fixed effects in nonlinear panel models like logit, you shouldn't do it by throwing in dummies for firms and years like you might with OLS. Those estimates are biased if you have insufficient observations per dummy (you would have 11 observations per firm dummy, not enough). Instead, use the conditional logit fixed effects estimator, which should be implemented in newer versions of statistics software. In Stata, you can do this via

xtset firmid year
xtlogit depvar x1 x2 x3, fe


In short, you should use firm fixed effects if you believe you have not included essential time invariant explanatory variables. Fixed effects will control for those time invariant factors. You should not use fixed effects if you want to estimate the effect of particular time invariant factors. You could not estimate those coefficients jointly with fixed effects. In most cases, fixed effects make your regression more robust, and that's why most economists use fixed effects.

Last point: are you estimating bankruptcy probabilities of firms? It seems to me that survival models, rather than binary choice models, would be more appropriate for this question.