Nonlinear Random Effects Model

Econometrics
Introduced by
Heckman (1981); Chamberlain (1984); further systematized by Wooldridge (2010)
Year
1981–2010
Type
Panel data / nonlinear regression
Family
Econometrics / time series

What does it do?

The nonlinear random effects model extends random effects estimation to panel outcomes that are binary, count-based, censored, or otherwise not continuously distributed.

It treats each unit's unobserved effect as a random draw from a distribution and integrates it out, yielding a marginal likelihood that can be maximised over the structural parameters.

The intuition behind the method

In a standard linear panel model, unit-level differences can be removed by subtracting individual means. With nonlinear models such as probit, logit, Poisson or Tobit, that differencing does not work, because the link is not linear and the unit effect does not cancel out of the likelihood. The random effects approach instead assumes the unit effect is a random variable independent of the regressors, specifies its distribution (usually normal), and integrates it out. The result is a marginal likelihood that models each individual's sequence of observations jointly, so the within-unit correlation that panel data exhibit is captured.

History

Simulation-based estimation of nonlinear random effects models is treated in the econometrics literature on simulation methods. Econometric Analysis (8th edition), Section 15.6.1, presents the nonlinear random effects model as an application of a simulation-based estimator, and Section 15.6.2 covers the integration methods used to evaluate the marginal likelihood.

When to use it

Use the nonlinear random effects model when you have repeated observations on the same units (panel data) and a non-continuous outcome such as a binary indicator, an event count, or a censored variable, and when you are willing to assume that the unobserved individual heterogeneity is uncorrelated with the regressors. It is especially valuable in short panels (small T, large N) where fixed effects estimation would consume too many degrees of freedom or suffer from incidental parameters bias. Do not use it when the regressors are likely correlated with the unobserved individual effect; a correlated random effects (Mundlak-Chamberlain) specification or a conditional fixed effects estimator is more appropriate in that case.

Limitations and considerations

  • Consistency rests on the assumption that c_i is orthogonal to the regressors. The model does not test this assumption itself; a Mundlak-Chamberlain test is needed to assess it, and violation leads to biased estimates.
  • The marginal likelihood requires numerical integration over c_i, which can be computationally demanding and sensitive to the number of quadrature points.
  • Unlike linear random effects, no simple Hausman-type comparison with fixed effects is available; testing against fixed effects alternatives requires more involved procedures.
  • Individual partial effects are not identified; only average partial effects over the distribution of c_i are reported.
  • Avoiding the incidental parameters problem depends on imposing the random effects distribution, which may itself be misspecified, so results can be sensitive to that distributional choice.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Models non-continuous and limited dependent variables (binary, count, censored) in panel data, where linear random effects estimation is not appropriate for the outcome.
  • Avoids estimating a separate parameter for each unit, which is the source of the incidental parameters problem in nonlinear fixed effects models; the unit effects are integrated out instead.
  • Estimates the variance of the unit effect directly, giving a measure of how much unobserved heterogeneity is present.
  • Average partial effects on the outcome probability or expected count can be computed, which makes results comparable across specifications.
  • Accommodates unbalanced panels, since each unit's likelihood contribution uses whatever observations that unit has.

Applications

  • Modelling binary health outcomes (e.g., disease onset) over time in longitudinal cohort studies.
  • Estimating firm-level patent counts or R&D activity using a random effects Poisson or negative binomial model.
  • Analysing household labour force participation across survey waves with a random effects probit.
  • Studying student exam pass/fail outcomes across semesters while controlling for unobserved ability.
  • Estimating consumer purchase decisions in marketing panels with a random effects logit.
  • Examining loan default probabilities across bank-borrower panels in credit risk research.

How it works

How it works

1

The conditional mean or probability of the outcome for individual i at time t is written as a known nonlinear function f of the observed covariates x_it, a structural parameter vector β, and an unobserved individual-specific effect c_i. Common choices for f include the normal CDF (probit), the logistic function (logit), the exponential (Poisson), or a censoring mechanism (Tobit).

Formula
y_{it} = f(x_{it}, \beta, c_i) + \varepsilon_{it}
2

The individual-specific effect c_i is assumed to be independently and identically distributed across units with mean zero and variance σ_c², and to be independent of the regressors x_it. This orthogonality assumption is what separates the random effects approach from fixed effects, which permit c_i to be correlated with x_it. The general form leaves the density g(c_i) unspecified; the normal distribution is the usual choice in applied work.

Formula
c_i \sim \text{iid}(0, \sigma_c^2), \quad c_i \perp x_{it}
3

Because c_i is unobserved it must be integrated out of the joint likelihood for individual i. The resulting marginal likelihood L_i is the product of observation-level densities averaged over the distribution of c_i. For most link functions this integral has no closed form, so it is evaluated numerically, by Gauss-Hermite or adaptive quadrature, or by simulation (simulated maximum likelihood).

Formula
L_i(\beta, \sigma_c^2) = \int \prod_{t=1}^{T} f(y_{it} | x_{it}, c_i;\beta)\, g(c_i)\, dc_i
4

The model is estimated by maximising the sum of the marginal log-likelihoods across individuals, typically with gradient-based optimisers such as Newton-Raphson or BFGS. Because the integral is approximated numerically, estimates should be checked for sensitivity to the number of quadrature points. The guidance on this page is to start near 12 points and increase (for example to 20) until the coefficients stabilise.

5

Standard errors are obtained from the inverse Hessian of the log-likelihood or from a robust sandwich estimator. Partial effects on the outcome probability or expected count are computed by averaging over the empirical distribution of c_i (average partial effects), because individual-level partial effects are not identified in nonlinear random effects models.

Common pitfalls

  • Using too few quadrature points produces imprecise likelihood evaluations and unstable coefficients. Check sensitivity by refitting with more points, as the FAQ describes.
  • Reporting raw coefficients as if they were marginal effects. In nonlinear models the coefficients are not directly the effect of a regressor on the outcome probability or expected count; report average partial effects instead.
  • Skipping the Mundlak-Chamberlain test, which adds auxiliary terms that summarise each unit's time-varying regressors and tests their joint significance, to check whether the random effects assumption is tenable.
  • Fitting a linear random effects model to a binary or count outcome. This does not model the conditional probability or mean correctly and can give misleading effects.
  • Reading a large estimated σ_c² as evidence of good model fit. It indicates strong unobserved heterogeneity but says nothing by itself about whether the random effects assumption or the functional form is correct.

Frequently asked questions

What is the incidental parameters problem and why does it motivate random effects?

In nonlinear fixed effects models, each individual requires its own parameter. When N is large but T is small, these incidental parameters are estimated from very few observations, causing bias that does not vanish as the sample grows. The random effects approach avoids this by integrating out individual effects rather than estimating them directly.

How do I test whether random effects or fixed effects is more appropriate?

A Mundlak-Chamberlain test adds auxiliary terms that summarise each unit's time-varying regressors to the random effects model. A joint test of their significance evaluates whether the random effects assumption is violated. Conditional likelihood estimators (e.g., conditional logit) provide a fixed effects alternative for binary outcomes but do not identify time-invariant regressors.

How many quadrature points should I use?

Start with 12 points and refit with 20 and 24. If coefficients change substantially, the default is insufficient, so increase the number until estimates stabilise. Adaptive quadrature (available in Stata's xtprobit and R's lme4) may require fewer points than standard Gauss-Hermite quadrature.

Can I use a random effects logit instead of probit?

Yes. Both are consistent under their respective distributional assumptions for the random effect. The logit version is slightly more convenient computationally, while the probit version assumes a normal random effect, which is the usual choice in software. The two may give similar average partial effects, although this should be checked for a given dataset.

What software packages support nonlinear random effects models?

Stata offers xtprobit, xtlogit, xtpoisson, and xttobit with quadrature-based integration. R provides glmer (lme4) and gnm. SAS provides PROC NLMIXED, which is highly flexible for custom nonlinear likelihoods.

Related methods

Sources

  1. Wooldridge, J. M. (2010). Econometric Analysis of Cross Section and Panel Data (2nd ed.). MIT Press.

    ISBN: 978-0262232586
  2. Hsiao, C. (2014). Analysis of Panel Data (3rd ed.). Cambridge University Press.

    ISBN: 978-1107038691
  3. Econometric Analysis, 8th Edition, Section 15.6.1