EconBase
← Back to paper

On the Existence of Conditional Maximum Likelihood Estimates of the Binary Logit Model with Fixed Effects

Extracted main text — title through conclusion, appendix excluded. This is what our citation measures are computed over, published so the extraction can be checked by eye.

11,318 characters · 0 sections · 16 citation commands

Rendered from LaTeX for readability, not typeset faithfully. Citation keys are highlighted; maths is left as source; figures, tables and equation environments are summarised rather than reproduced; unrecognised commands are greyed out so nothing is silently dropped. Email addresses are removed.

On the Existence of Conditional Maximum Likelihood Estimates of the Binary Logit Model with Fixed Effects

abstractBy exploiting McFa73's results on conditional logit estimation, we show that there exists a one-to-one mapping between existence and uniqueness of conditional maximum likelihood estimates of the binary logit model with fixed effects and the configuration of data points. Our results extend those in Anderson_1984 for the cross-sectional case and can be used to build a simple algorithm that detects spurious estimates in finite samples. As an illustration, we exhibit an artificial dataset for which the STATA's command clogit returns spurious estimates. Keywords: separation, collinearity, binary choice models, fixed effects.\\ \noindentJEL Codes: C13, C25.

\@startsection{section}{2}{0mm}{-1.5\baselineskip}{1\baselineskip}{\normalfont}{Introduction} Suppose there are $i=1,\dotsc,n$ individuals who are observed making a choice from $j \in \{0,1\}$ alternatives, over $t=1, \dotsc, T$ choice situations. Individual $i$'s sequence of choices is $Y_{i}:=(Y_{i1}, \dotsc, Y_{iT})$ with elements $Y_{it}=\mathds 1\{i \text{ chooses } 1 \text{ in } t\}$ that indicate $i$'s choice in choice situation $t$. Suppose in addition to observe individual-specific covariates $X_{it}\in \mathbb R^p$ for individual $i$ in choice situation $t$. Individual $i$'s sequence of covariates is then $X_i:=(X_{i1}', \dotsc, X_{iT}')'$. Let $\mathbf{Z}_n:=(Y_i,X_i)_{1\leq i\leq n}$ denote the sample data. Provided it exists and is unique, the conditional maximum likelihood estimator (that we denote by $\widehat{\beta}_n^{\mathrm{CMLE}}$) verifies

equation[equation omitted — 149 chars of source]

where

equation*[equation* omitted — 218 chars of source]

As Andersen_1970 showed rasch1961, $\widehat{\beta}_n^{\mathrm{CMLE}}$ is consistent for the binary logit model with fixed effects. However, it may be the case that $\widehat{\beta}_n^{\mathrm{CMLE}}$ does not exist in finite samples (the maximum in (ref) is not unique, or the conditional log-likelihood does not have a maximum). While Anderson_1984 established necessary and sufficient existence conditions for maximum likelihood estimates in cross-sectional logistic regression models,\footnote{Anderson_1984 show that, under a rank condition on the design matrix, maximum likelihood estimates exist if and only if there is no binary linear classifier that perfectly predicts outcome from covariates for all data points lying outside the decision frontier.} such conditions for $\widehat{\beta}_n^{\mathrm{CMLE}}$ are lacking. Yet, these are of interest for at least two reasons. First, practitioners often use off-the-shelf programs with built-in nonlinear solvers which do not systematically detect, tag, or even report situations where estimates do {\em not} exist Cullough_2003. Specifically, we show below with an artificial dataset that STATA's clogit stops after some iterations and returns spurious results, which further illustrates that the problem has not been widely reckognized.\footnote{Noteworthy, the “clogit” section in the Stata User's Guide does not discuss the existence problem at all.} Second, it is easily seen that $\widehat{\beta}_n^{\mathrm{CMLE}}$ does not take advantage of all the variation available in the data. This mechanically increases the probability of existence failure as we shall see. In this paper, we extend the data separation rules established in Anderson_1984 for cross-sectional logistic models. Our results hold under a rank condition which is similar to Anderson_1984' full rank assumption imposed on the matrix of covariates (see Assumption (ref) below).

In Section (ref), we derive our main existence theorem and provide a simple algorithm to detect existence failures. In Section (ref), we exhibit an artificial dataset for which existence fails but clogit does not detect such failure and returns spurious estimates.

\@startsection{section}{2}{0mm}{-1.5\baselineskip}{1\baselineskip}{\normalfont}{Necessary and Sufficient Existence Conditions} Following the terminology employed in McFa73, the sample $\mathbf{Z}_n$ results from a choice experiment composed of $n$ distinct trials $(X_i, B_i)$, where $B_i$ is the alternative set defined as

equation*[equation* omitted — 105 chars of source]

The alternative set contains $r_{ni}:={T \choose \sum_{t=1}^TY_{it}}$ alternatives $d_i^j$, indexed by $j=1, \dotsc,r_{ni}$, and with vectors of attributes $\sum_{t=1}^Td_{it}^jX_{it}$. Note that the number of alternatives, $r_{ni}$, differs from one individual to another. Let us define $r_n:=\sum_{i=1}^Nr_{ni}$. By rewriting Axiom 5 in McFa73 to fit our framework, we shall make the following assumption.

hypFor all $\beta \in \mathbb R^p$, the $r_n \times p$ matrix whose rows are $$\left(\sum_{t=1}^Td_{it}^jX_{it} - \sum_{s=1}^{r_{ni}}\frac{\sum_{t=1}^Td_{it}^sX_{it}\exp(\sum_{t=1}^Td_{it}^sX_{it}'\beta)}{\sum_{\ell=1}^{r_{ni}}\exp(\sum_{t=1}^Td_{it}^\ell X_{it}'\beta)}\right)'$$ for $j=1, \dotsc, r_{ni}$ and $i=1, \dotsc, N$ is of rank $p$.

Assumption (ref) holds when the data vary sufficiently across periods. A necessary condition is $r_n \geq p + N$. This is likely to hold in practice if $p$ has a reasonable size. If $N\geq p$, it will hold generally since $r_{ni}\geq 2$, but it may also hold for $N<p$ if $T$ is large. The following condition is an adaptation of Axiom 6 in McFa73.

hypIt does not exist $\beta^\ast \in \mathbb R^{p}\backslash\{0\}$ satisfying $$\sum_{t=1}^T(d^j_{it} - Y_{it})X_{it}'\beta^\ast \geq 0$$ for $j = 1, \dotsc,r_{ni}$ and $i = 1, \dotsc, N$.

Assumption (ref) is reminiscent of the separation and quasi-complete separation relationships (4) and (6) in Anderson_1984. However, it is specific to the panel data structure considered here.

thmSuppose Assumption (ref) holds. Then, Assumption (ref) is necessary and sufficient for the existence of a finite and unique $\widehat{\beta}_n^{\mathrm{CMLE}}$.

Theorem (ref) gives a sufficient and necessary condition for existence and uniqueness of conditional maximum likelihood estimates that depends only on the configuration of data points. It follows from an application of Lemma 3 in McFa73. We now turn to the problem of finding an automated procedure for detecting if Assumption (ref) holds in practice.

thmSuppose Assumption (ref) holds. Then, Assumption (ref) holds if and only if the minimum in the following quadratic programming problem is zero: $$\min_{u, \beta} u'u$$ subject to \begin{equation*} u = \sum_{i=1}^N\sum_{j=1}^{r_{ni}}\beta_{ij}\sum_{t=1}^T(d^j_{it} - Y_{it})X_{it} and \beta_{ij}\geq 1. \end{equation*}

Theorem (ref) follows from an application of Lemma 4 in McFa73. Note that a Python module called BinLogitCMLE that implements the program given in Theorem (ref) before computing $\widehat{\beta}^{\mathrm{CMLE}}_n$ is made publicly available on the author's Github page.\footnote{\href{https://github.com/martinmugnier/BinLogitCMLE}{https://github.com/martinmugnier/BinLogitCMLE}.}

\@startsection{section}{2}{0mm}{-1.5\baselineskip}{1\baselineskip}{\normalfont}{An Example with Artificial Data} We generate an artificial dataset of $10$ individuals (with personal identifiers $\mathbf{id}$) who are observed at periods $\mathbf{t}\in\{1,2,3\}$. The choice variable is $\mathbf{y}_{it} \in \{0,1\}$ and there is a unique regressor $\mathbf{x}_{it} \in [0,1]$. The data is displayed in Table (ref).

table[table omitted — 1,066 chars of source]

Note that $\mathbf{y}_{it}=1$ if and only if $\mathbf{x}_{it}>0.5$. Hence, the stacked data is separated in Anderson_1984' sense. Actually, it is easy to check that the data also violate Assumption (ref). While the logit program detects the separation (see Figure (ref)), clogit does not detect violation of Assumption (ref) and returns spurious estimates after three iterations (see Figure (ref)). Although the estimated standard error (resp. the log-likelihood function) is quite large (resp. almost zero), the user may miss the crucial fact that these results are informative only about the nonexistence of the estimate. We note that BinLogitCMLE detects the existence failure as expected.

\@startsection{section}{2}{0mm}{-1.5\baselineskip}{1\baselineskip}{\normalfont}{Appendix}

figure[figure omitted — 123 chars of source]
figure[figure omitted — 142 chars of source]