A fixed-effects model is a statistical model in which particular effects are represented by unknown parameters to be estimated, rather than by a specified probability distribution over those effects. The term has several related meanings. In experimental statistics, fixed effects usually describe the particular treatment or factor levels whose differences are of interest. In econometrics, fixed-effects models commonly include a separate intercept for each individual, firm, region, or other observational unit, allowing those intercepts to be associated with the explanatory variables. In meta-analysis, a fixed-effect model usually assumes that the studies being combined estimate a single common underlying effect.
Fixed-effects methods are important because they distinguish variation within groups from variation between groups. In longitudinal data, they can remove unobserved characteristics that remain constant within a unit, such as a firm's persistent organizational features or a location's geographical attributes. Their usefulness nevertheless depends on what varies in the data, which assumptions connect the regressors to the remaining errors, and whether the intended interpretation is descriptive, predictive, or causal. Fixed effects do not, by themselves, eliminate all forms of confounding or establish causation.
Meaning in experimental statistics
In experimental design and analysis of variance, a factor is commonly treated as fixed when inference concerns its specified levels. An experiment comparing three named fertilizers, for example, may seek estimates of the differences among those fertilizers rather than the variability of a hypothetical population of fertilizers. The treatment effects are then unknown constants. The observations remain random because of sampling variation, experimental error, or randomized treatment assignment; “fixed” does not mean that the measured outcomes are nonrandom.
A one-factor model can be written as
where is an overall level, is the effect of treatment , and is the error for observation under that treatment. The parameters are not uniquely defined without a coding convention: adding a constant to and subtracting it from every leaves all fitted values unchanged. Common conventions set one treatment effect to zero or impose . These conventions change the interpretation of individual coefficients, not the fitted treatment means.
Under independent, normally distributed errors with common variance , classical analysis of variance tests the null hypothesis that all treatment means are equal by comparing between-treatment and within-treatment mean squares. More general comparisons use contrasts, such as the difference between one fertilizer and the average of two others. The scientific question determines the contrast; a coefficient's numerical value also depends on the chosen coding.
Models with several factors can contain both main effects and interactions. For two fixed factors,
The interaction expresses how the effect of one factor changes across levels of the other. It is distinct from the distinction between fixed and random effects.
The familiar contrast between “chosen levels” and “randomly sampled levels” is useful but not a complete definition. A classification also depends on the inferential target and model assumptions. The same set of schools, for example, might be represented by separate fixed coefficients when school-specific comparisons are central, or by a distribution of school effects when estimating between-school variability is central. A model containing both kinds of terms is a mixed-effects model.
Panel-data formulation and within-unit information
In panel data, the same units are observed repeatedly. A basic linear fixed-effects model is
Here is the outcome, is a vector of time-varying regressors, is a common slope vector, and is a unit-specific intercept. The intercept collects all additive influences that are constant over time within unit . Unlike standard random-intercept specifications, the fixed-effects formulation does not require to be uncorrelated with the regressors.
For a balanced panel, taking the time average within each unit gives
Subtracting this equation from the original produces the within transformation:
The intercept disappears exactly. The resulting slope estimate uses departures from each unit's own average, rather than differences in average levels across units. For an unbalanced panel, unit means are taken over the observations available for that unit; the same algebra eliminates its intercept.
Consider a study of firms' output and capital investment. Firms with persistently better management may have both higher investment and higher output. A pooled regression can attribute some of the management-related output difference to investment. A firm fixed-effects regression removes management differences to the extent that their influence is additive and constant during the observation period. It then relates changes in a firm's investment to changes in its output, after accounting for any other included variables.
This interpretation determines what can be learned. A regressor that is constant within every unit is eliminated along with the intercepts. A country's geographical area, for example, cannot have a separately identified coefficient in a model with country fixed effects unless some additional structure or source of variation is introduced. Time-varying interactions with a constant characteristic can remain identifiable because those interactions may vary within units.
The common slope is itself an assumption. Allowing every unit its own intercept does not allow every unit its own response to investment, prices, or policy. If slopes differ, the fixed-effects coefficient generally represents a particular aggregation of those differences, with weights determined by the available within-unit variation. It need not equal the unweighted average of the unit-specific slopes.
Least-squares estimation and projection geometry
For a linear model, three familiar procedures produce the same slope estimate when applied to the same observations with the same weights: including unit indicators explicitly, applying the within transformation, and residualizing the outcome and regressors with respect to the unit indicators. This equivalence is a consequence of the Frisch–Waugh–Lovell theorem.
Let be a matrix of group indicators, the matrix of regressors, and the outcome vector. Write
With a full-column-rank representation of , define
The matrix is the orthogonal projection onto the space spanned by the indicators, while removes that component. The fixed-effects slope estimator is
provided the inverse exists. Thus ordinary least squares on the residualized data is algebraically equivalent to least squares on the full indicator model.
Identification requires to have full column rank. Merely having many observations does not guarantee this condition. A regressor can vary in the original data yet become constant, zero, or a linear combination of other regressors after fixed effects are removed. For example, a national policy variable that changes only by year is absorbed completely by year indicators in a single-country panel.
An illustrative two-unit example shows the source of information. Suppose the first unit's regressor rises from 1 to 3 while its outcome rises from 4 to 8, and the second unit's regressor rises from 10 to 12 while its outcome rises from 30 to 34. Both units have within-unit changes satisfying , so the fixed-effects slope is 2. Their very different average levels do not determine that slope. With exactly two observations per unit, within estimation and ordinary least squares on first differences yield the same slope.
Once is known, the unit intercepts can be recovered as
under a parameterization without a separate overall intercept. If unit indicators and independent regressors are fitted to observations, the residual degrees of freedom are . Residualizing the data does not make the estimated group parameters disappear from the parameter count. Software must account for the rank of the absorbed effects when calculating residual variance and finite-sample adjustments.
Exogeneity, identification, and causal interpretation
The principal advantage of unit fixed effects is their accommodation of arbitrary association between the regressors and additive, time-constant unit characteristics. This addresses one important source of endogeneity, but the model still requires assumptions about the remaining time-varying error. A standard condition for the static linear model is strict exogeneity:
The conditional expectation is taken given the unit's entire regressor history, including future observations. Under this condition and suitable rank and sampling assumptions, the within estimator is conditionally unbiased and can be consistent as the number of independent units increases.
Strict exogeneity is stronger than requiring the current regressor to be uncorrelated with the current error. A shock to today's outcome must not affect tomorrow's regressors in a way that violates the condition. For example, an unexpected decline in a firm's output may lead it to increase investment the following year. Even if current investment was determined before the current shock, this feedback connects the shock to a future regressor. Since within transformation uses averages over all periods, that relationship can bias the transformed regression.
Time-varying omitted variables also remain a problem. Individual fixed effects can remove a person's stable characteristics, but not an unmeasured change in motivation that simultaneously affects education decisions and earnings. Similarly, location fixed effects do not remove location-specific changes in economic conditions. Adding year indicators absorbs shocks common to all units, not every shock occurring during a year.
A causal interpretation therefore requires more than a regression specification. In causal inference, treatment assignment, the timing of outcomes, interference between units, and the role of included covariates all matter. Conditioning on a variable caused by treatment may remove part of the effect of interest or introduce selection problems. Fixed effects do not resolve those issues simply by being included.
Classical measurement error presents another limitation. If the true regressor changes little within units but its measurement error changes substantially, demeaning can leave a particularly unfavorable signal-to-noise ratio. The resulting attenuation can be more severe than in a regression using between-unit variation, although the precise comparison depends on the error structure.
The within design also makes the relevant support explicit. If a binary treatment never changes for most units, those units have no within-unit treatment variation. They may still help estimate other components of a larger model, but they cannot supply the same direct treatment contrast as units whose status changes. Identification is a property of the residualized design, not of the label “fixed effects.”
Comparison with random effects and partial pooling
A basic random-effects model represents unit-specific variation as a random component:
often assuming that has mean zero, variance , and is uncorrelated with the full regressor history. This formulation supplies a covariance structure: two observations from the same unit share and are therefore correlated even when their idiosyncratic errors are independent.
Under its assumptions, random-effects estimation uses both within-unit and between-unit information. In a balanced panel with homoskedastic, serially independent idiosyncratic errors, its generalized least-squares transformation subtracts a fraction of each unit mean:
where
When the unit-level variance is zero, , giving pooled least squares. As the unit-level component becomes large relative to the idiosyncratic component, approaches 1, approaching the within transformation. This algebra explains how random effects retain information that fixed effects discard.
The distinction is not simply whether the units were randomly sampled. A sample of people can be analyzed with person fixed effects, and an exhaustive set of regions can be analyzed using a hierarchical probability model. The central questions concern the target of inference, the relationship between group effects and regressors, and the consequences of specifying a distribution for those effects.
A useful bridge is the correlated random-effects formulation associated with Yair Mundlak's 1978 work. It writes the unit effect as a function of regressor means plus a residual component, for example
Including the unit means permits correlation between the original unit effect and the observed regressors through those means. In the standard linear setup, this construction can recover the within slope while also modeling between-unit relationships. Gary Chamberlain subsequently developed broader formulations using regressor histories.
The Hausman test, introduced by Jerry Hausman in 1978, compares estimators that should agree under a specified null hypothesis, commonly fixed-effects and conventional random-effects slopes. Its interpretation depends on the consistency and covariance assumptions of the estimators being compared; nonrejection does not prove that the random-effects assumptions hold.
Random-effects and hierarchical models also provide partial pooling: noisy group estimates are pulled toward a common mean. Unpenalized group fixed effects do not impose this shrinkage. Partial pooling can improve prediction for sparsely observed groups, but its performance depends on the distributional and structural assumptions used.
Uncertainty, dependence, and hypothesis testing
Estimating fixed effects does not automatically produce valid standard errors. Coefficient estimation and uncertainty estimation are distinct tasks. In particular, removing unit means does not eliminate serial correlation, unequal error variances, or dependence among units. Even when the original idiosyncratic errors are independent over time, the demeaned errors share a unit mean and are mechanically dependent.
Under restrictive homoskedastic and independent-error assumptions, ordinary least-squares formulas can be applied with the appropriate parameter count. Panel data often require a different covariance estimator. If errors may be arbitrarily correlated over time within each unit but units are independent of one another, a cluster-robust covariance estimator groups all observations from a unit together.
Writing the residualized design for cluster as and its fitted residual vector as , a basic cluster sandwich estimator is
Finite-sample corrections vary across implementations. The formula permits general covariance within a cluster rather than treating each observation as an independent contribution to information.
The level of clustering depends on the dependence and assignment structure, not necessarily on the level of the fixed effects. If a policy is assigned at the state level, thousands of individual observations within each state do not necessarily represent thousands of independent policy changes. Individual fixed effects can coexist with state-clustered uncertainty estimates. Where disturbances are correlated both within firms across time and across firms within years, multiway clustering may be appropriate under its own assumptions.
Conventional cluster asymptotics rely on a sufficiently large number of suitably behaved independent clusters. A large total observation count cannot compensate automatically for having only a few clusters or one dominant cluster. Small-sample methods include adjusted covariance estimators, modified reference distributions, and forms of the wild cluster bootstrap. Their validity depends on the design; no single correction resolves every small-cluster problem.
Fixed-effects models can also support tests of whether group intercepts are jointly equal, tests of specified slope restrictions, and confidence intervals for estimable contrasts. Such tests must use a covariance model appropriate to the errors. A large increase in the coefficient of determination after adding indicators primarily shows that group means explain outcome variation; it does not establish that the slope coefficients are causal or precisely estimated.
Two-way and high-dimensional fixed effects
A two-way fixed-effects model includes effects for two classifications. In a panel, these are commonly units and periods:
The unit effects absorb persistent differences across units, while the period effects absorb additive shocks common to all units at a given time. Since adding a constant to every and subtracting it from every leaves predictions unchanged, a normalization is required.
For a complete, equally weighted balanced panel, removing both sets of effects is accomplished by double demeaning:
The same transformation applies to each regressor. In an unbalanced panel, this simple expression does not generally produce the exact residuals from projection on both indicator sets. Algorithms instead solve the joint least-squares problem, often by repeatedly subtracting means for each grouping until convergence.
Applications can contain several large sets of effects: worker and employer effects in wage data, exporter-year and importer-year effects in international trade, or school and cohort effects in educational research. Explicitly constructing every indicator can be computationally expensive. Absorption methods, sparse matrices, iterative solvers, and preconditioning exploit the structure of the problem to estimate the slopes without storing a dense indicator matrix.
The organization of the data also determines which effects are separately identifiable. In a worker–firm model, workers and firms form a bipartite network. A worker links to each firm at which that worker is observed. If the network separates into disconnected components, relative worker and firm effects cannot be compared across components without additional restrictions. The connectedness problem links fixed-effects estimation to graph theory and numerical linear algebra.
Unit and time effects are central to difference-in-differences analysis. With two groups and two periods, a treatment indicator for the treated group after treatment yields the familiar difference of changes. Its causal interpretation requires, among other conditions, an appropriate parallel-trends assumption and no treatment anticipation.
With staggered treatment adoption and heterogeneous effects, a single two-way fixed-effects treatment coefficient can combine comparisons in problematic ways. Already-treated groups may serve as controls for groups treated later, and implied weights on group-period treatment effects can be negative. Consequently, the coefficient need not equal a simple average treatment effect. Group-time and cohort-specific approaches separate these comparisons and make the target effect more explicit.
Nonlinear models and dynamic panels
The simplicity of demeaning is specific to additive linear models. If a unit effect enters a nonlinear response function, subtracting unit means generally does not remove it. For example, a binary-outcome model may specify
Demeaning the binary outcomes and regressors does not transform this into an equivalent logistic regression without .
Estimating a separate nuisance parameter for every unit can create the incidental parameters problem, classically studied by Jerzy Neyman and Elizabeth Scott in 1948. As the number of units increases while the observations per unit remain fixed, the number of nuisance parameters also increases. In many nonlinear models, their imprecise estimation produces a bias in the common parameters that does not vanish merely because more units are added. This differs from the strictly exogenous linear model, where elimination of the intercepts permits consistent slope estimation with fixed .
For the standard fixed-effects logit model with conditionally independent Bernoulli outcomes, conditioning on the total number of successes for a unit removes its intercept from the likelihood. Conditional maximum likelihood can then estimate the common slope without estimating every intercept. Units whose outcomes are always zero or always one have a degenerate conditional outcome pattern and contribute no information about that slope. Conditional estimation also does not directly recover the intercepts needed for unit-specific fitted probabilities.
Other nonlinear models have different properties. Under suitable strict-exogeneity and regularity conditions, fixed-effects Poisson estimation can consistently estimate slopes from a correctly specified exponential conditional mean, even when the conditional variance is not Poisson. Probit generally lacks an analogous sufficient-statistic conditioning device that removes the intercepts. Analytical bias corrections, split-panel methods, and assumptions about large therefore play different roles across nonlinear specifications.
Dynamics create a separate difficulty even in linear models:
The demeaned lagged outcome is correlated with the demeaned error, because time averages contain errors related to lagged outcomes. The resulting short-panel bias is associated with Stephen Nickell's 1981 analysis and is commonly of order under standard conditions. Increasing the number of units alone does not eliminate it.
Instrumental-variable and moment-based methods address dynamic panels using suitably lagged observations under additional assumptions. The Arellano–Bond estimator, published in 1991, uses lagged levels as instruments for differenced equations. Its validity depends on error and timing restrictions; numerous instruments can themselves weaken finite-sample performance and specification tests.
Fixed-effect models in meta-analysis
In meta-analysis, the term fixed-effect model, often singular, usually denotes a common-effect model. Suppose study reports an estimated effect with sampling variance . The model is
All studies estimate the same underlying effect ; observed differences arise from sampling error. This is not the panel-data construction of assigning each study an unrestricted intercept. Indeed, freely estimating a separate underlying effect for each study would remove the common-effect restriction that enables this particular pooling procedure.
For independent studies with known variances, inverse-variance weighting gives
with
A more precise study therefore receives more weight. In practice, sampling variances are usually estimated, and approximation quality can matter, especially for small studies, rare events, or strongly skewed effect estimators. Some effect measures require specialized pooling methods rather than a direct normal approximation.
A random-effects meta-analysis instead allows study-specific underlying effects, often written
Its conventional inverse-variance weights are , with representing between-study heterogeneity. The distinction concerns the assumed scientific effects and the inferential target, not simply whether one interval is wider. A random-effects summary estimates a mean of an effect distribution, while a common-effect summary targets one shared effect.
Clinical setting, population, intervention delivery, outcome definitions, and study methods can all produce genuine heterogeneity. Cochran's statistic measures weighted dispersion around a common estimate, but its ability to detect heterogeneity depends on the number and precision of studies. Failure to reject homogeneity does not demonstrate that the true effects are identical.
Dependent estimates require further structure. Two effect estimates from the same participants, or several treatment comparisons sharing a control group, generally cannot be treated as independent studies in the elementary formula. Their covariance affects both efficient weighting and uncertainty. Moreover, neither common-effect nor random-effects pooling corrects biased study estimates, selective publication, or incompatible outcome definitions. The pooling model describes how effect estimates are combined; it does not establish the validity of the evidence entering the combination.
Interpretation, applications, and reporting
Fixed-effects models occur in research settings with substantially different objectives. In a randomized block experiment, block effects can account for systematic differences in soil plots or experimental batches while treatment comparisons remain central. In a longitudinal economic study, unit effects can address association between persistent characteristics and regressors. In a worker–firm model, the fixed effects themselves may be the objects of substantive interest. These uses share a mathematical representation but do not share every identifying assumption.
A clear interpretation separates three quantities: the common slopes, the group intercepts, and the fitted outcomes. The slope describes the modeled relationship after the included effects have been removed. An intercept describes a group's residual level under the chosen normalization and covariate specification. A fitted outcome combines both. A large estimated firm effect, for example, is not automatically a causal estimate of what would happen to any worker moved to that firm; sorting, mobility, interactions, and model misspecification can affect that interpretation.
Prediction raises a further distinction. A fixed-effects model can produce a fitted intercept for a group represented in the estimation sample. It has no unrestricted estimated intercept for a wholly new group. Predictions for unseen groups therefore require an additional convention or model, such as assigning a reference intercept or using a hierarchical distribution. Even for observed groups, short records can leave their intercept estimates noisy despite relatively precise estimation of a common slope.
Model descriptions are most informative when they state exactly which effects are included: individual, household, firm, region, period, or interactions among classifications. “Controlling for fixed effects” alone does not identify the variation used. A model with region and year effects differs from one with region-by-year effects; the latter absorbs every variable that is constant within a region-year cell. Likewise, unit-specific linear trends remove a different space of variation from unit intercepts alone.
Interpretation also depends on the effective sample after missing observations, collinear regressors, and model-specific exclusions have been handled. An observation that is the sole member of its group supplies no within-group information in a one-way linear model. In nonlinear estimation, constant-outcome groups or perfectly predicted observations may be excluded for different mathematical reasons. These changes can alter both precision and the population to which estimates relate.
Reporting commonly distinguishes within, between, and overall measures of fit, gives the number of units and observations, identifies the covariance estimator and clustering level, and specifies coefficient normalizations when group effects are presented. Those details reveal whether an estimate is driven by repeated changes within units, differences across units, or assumptions that combine the two.