Fixed effects model
In statistics, a fixed effects model is a statistical model in which the model parameters are fixed or nonrandom quantities. This is in contrast to random effects models and mixed models in which all or some of the model parameters are considered as random variables. In many applications including econometrics[1] and biostatistics[2][3][4][5] a fixed effects model refers to a regression model in which the group means are fixed (nonrandom) as opposed to a random effects model in which the group means are a random sample from a population.[6] Generally, data can be grouped according to several observed factors. The group means could be modeled as fixed or random effects for each grouping. In a fixed effects model each group mean is a groupspecific fixed quantity.
Part of a series on Statistics 
Regression analysis 

Models 
Estimation 
Background 

In panel data where longitudinal observations exist for the same subject, fixed effects represent the subjectspecific means. In panel data analysis the term fixed effects estimator (also known as the within estimator) is used to refer to an estimator for the coefficients in the regression model including those fixed effects (one timeinvariant intercept for each subject).
Qualitative description
Such models assist in controlling for omitted variable bias due to unobserved heterogeneity when this heterogeneity is constant over time. This heterogeneity can be removed from the data through differencing, for example by subtracting the grouplevel average over time, or by taking a first difference which will remove any time invariant components of the model.
There are two common assumptions made about the individual specific effect: the random effects assumption and the fixed effects assumption. The random effects assumption is that the individualspecific effects are uncorrelated with the independent variables. The fixed effect assumption is that the individualspecific effects are correlated with the independent variables. If the random effects assumption holds, the random effects estimator is more efficient than the fixed effects estimator. However, if this assumption does not hold, the random effects estimator is not consistent. The Durbin–Wu–Hausman test is often used to discriminate between the fixed and the random effects models.[7][8]
Formal model and assumptions
Consider the linear unobserved effects model for observations and time periods:
 for and
Where:
 is the dependent variable observed for individual at time .
 is the timevariant (the number of independent variables) regressor vector.
 is the matrix of parameters.
 is the unobserved timeinvariant individual effect. For example, the innate ability for individuals or historical and institutional factors for countries.
 is the error term.
Unlike , cannot be directly observed.
Unlike the random effects model where the unobserved is independent of for all , the fixed effects (FE) model allows to be correlated with the regressor matrix . Strict exogeneity with respect to the idiosyncratic error term is still required.
Statistical estimation
Fixed effects estimator
Since is not observable, it cannot be directly controlled for. The FE model eliminates by demeaning the variables using the within transformation:
where and .
Since is constant, and hence the effect is eliminated. The FE estimator is then obtained by an OLS regression of on .
At least three alternatives to the within transformation exist with variations.
One is to add a dummy variable for each individual (omitting the first individual because of multicollinearity). This is numerically, but not computationally, equivalent to the fixed effect model and only works if the sum of the number of series and the number of global parameters is smaller than the number of observations.[9] The dummy variable approach is particularly demanding with respect to computer memory usage and it is not recommended for problems larger than the available RAM, and the applied program compilation, can accommodate.
Second alternative is to use consecutive reiterations approach to local and global estimations.[10] This approach is very suitable for low memory systems on which it is much more computationally efficient than the dummy variable approach.
The third approach is a nested estimation whereby the local estimation for individual series is programmed in as a part of the model definition.[11] This approach is the most computationally and memory efficient, but it requires proficient programming skills and access to the model programming code; although, it can be programmed even in SAS.[12][13]
Finally, each of the above alternatives can be improved if the seriesspecific estimation is linear (within a nonlinear model), in which case the direct linear solution for individual series can be programmed in as part of the nonlinear model definition.[14]
First difference estimator
An alternative to the within transformation is the first difference transformation, which produces a different estimator. For :
When , the first difference and fixed effects estimators are numerically equivalent. For , they are not. If the error terms are homoskedastic with no serial correlation, the fixed effects estimator is more efficient than the first difference estimator. If follows a random walk, however, the first difference estimator is more efficient.[15]
Equality of fixed effects and first difference estimators when T=2
For the special two period case (), the fixed effects (FE) estimator and the first difference (FD) estimator are numerically equivalent. This is because the FE estimator effectively "doubles the data set" used in the FD estimator. To see this, establish that the fixed effects estimator is:
Since each can be rewritten as , we'll rewrite the line as:
Chamberlain method
Gary Chamberlain's method, a generalization of the within estimator, replaces with its linear projection onto the explanatory variables. Writing the linear projection as:
this results in the following equation:
which can be estimated by minimum distance estimation.[16]
Hausman–Taylor method
Need to have more than one timevariant regressor () and timeinvariant regressor () and at least one and one that are uncorrelated with .
Partition the and variables such that where and are uncorrelated with . Need .
Estimating via OLS on using and as instruments yields a consistent estimate.
Generalization with input uncertainty
When there is input uncertainty for the data, , then the value, rather than the sum of squared residuals, should be minimized.[17] This can be directly achieved from substitution rules:
 ,
then the values and standard deviations for and can be determined via classical ordinary least squares analysis and variancecovariance matrix.
Testing fixed effects (FE) vs. random effects (RE)
We can test whether a fixed or random effects model is appropriate using a Durbin–Wu–Hausman test.
 :
 :
If is true, both and are consistent, but only is efficient. If is true, is consistent and is not.
 where
The Hausman test is a specification test so a large test statistic might be indication that there might be errorsinvariables (EIV) or our model is misspecified. If the FE assumption is true, we should find that .
A simple heuristic is that if there could be EIV.
See also
Notes
 Greene, W.H., 2011. Econometric Analysis, 7th ed., Prentice Hall
 Diggle, Peter J.; Heagerty, Patrick; Liang, KungYee; Zeger, Scott L. (2002). Analysis of Longitudinal Data (2nd ed.). Oxford University Press. pp. 169–171. ISBN 0198524846.
 Fitzmaurice, Garrett M.; Laird, Nan M.; Ware, James H. (2004). Applied Longitudinal Analysis. Hoboken: John Wiley & Sons. pp. 326–328. ISBN 0471214876.
 Laird, Nan M.; Ware, James H. (1982). "RandomEffects Models for Longitudinal Data". Biometrics. 38 (4): 963–974. JSTOR 2529876.
 Gardiner, Joseph C.; Luo, Zhehui; Roman, Lee Anne (2009). "Fixed effects, random effects and GEE: What are the differences?". Statistics in Medicine. 28: 221–239. doi:10.1002/sim.3478.
 Ramsey, F., Schafer, D., 2002. The Statistical Sleuth: A Course in Methods of Data Analysis, 2nd ed. Duxbury Press
 Cameron, A. Colin; Trivedi, Pravin K. (2005). Microeconometrics: Methods and Applications. Cambridge University Press. pp. 717–19.
 Nerlove, Marc (2005). Essays in Panel Data Econometrics. Cambridge University Press. pp. 36–39.
 Garcia, Oscar. (1983). "A stochastic differential equation model for the height growth of forest stands". Biometrics: 1059–1072.
 Tait, David; Cieszewski, Chris J.; Bella, Imre E. (1986). "The stand dynamics of lodgepole pine". Can. J. For. Res. 18: 1255–1260.
 Strub, Mike; Cieszewski, Chris J. (2006). "Base–age invariance properties of two techniques for estimating the parameters of site index models". Forest Science. 52 (2): 182–186.
 Strub, Mike; Cieszewski, Chris J. (2003). "Fitting global site index parameters when plot or tree site index is treated as a local nuisance parameter In: Burkhart HA, editor. Proceedings of the Symposium on Statistics and Information Technology in Forestry; 2002 September 8–12; Blacksburg, Virginia: Virginia Polytechnic Institute and State University": 97–107. Cite journal requires
journal=
(help)  Cieszewski, Chris J.; Harrison, Mike; Martin, Stacey W. (2000). "Practical methods for estimating nonbiased parameters in selfreferencing growth and yield models" (PDF). PMRC Technical Report. 2000 (7): 12.
 Schnute, Jon; McKinnell, Skip (1984). "A biologically meaningful approach to response surface analysis". Can. J. Fish. Aquat. Sci. 41: 936–953.
 Wooldridge, Jeffrey M. (2001). Econometric Analysis of Cross Section and Panel Data. MIT Press. pp. 279–291. ISBN 9780262232197.
 Chamberlain, Gary (1984). "Chapter 22 Panel data". 2: 1247–1318. doi:10.1016/S15734412(84)020146. ISSN 15734412. Cite journal requires
journal=
(help)  Ren, Bin; Dong, Ruobing; Esposito, Thomas M.; Pueyo, Laurent; Debes, John H.; Poteet, Charles A.; Choquet, Élodie; Benisty, Myriam; Chiang, Eugene; Grady, Carol A.; Hines, Dean C.; Schneider, Glenn; Soummer, Rémi (2018). "A Decade of MWC 758 Disk Images: Where Are the SpiralArmDriving Planets?". The Astrophysical Journal Letters. 857: L9. arXiv:1803.06776. Bibcode:2018ApJ...857L...9R. doi:10.3847/20418213/aab7f5.
References
 Christensen, Ronald (2002). Plane Answers to Complex Questions: The Theory of Linear Models (Third ed.). New York: Springer. ISBN 0387953612.
 Gujarati, Damodar N.; Porter, Dawn C. (2009). "Panel Data Regression Models". Basic Econometrics (Fifth international ed.). Boston: McGrawHill. pp. 591–616. ISBN 9780071276252.
 Hsiao, Cheng (2003). "Fixedeffects models". Analysis of Panel Data (2nd ed.). New York: Cambridge University Press. pp. 95–103. ISBN 0521522714.
 Wooldridge, Jeffrey M. (2013). "Fixed Effects Estimation". Introductory Econometrics: A Modern Approach (Fifth international ed.). Mason, OH: SouthWestern. pp. 466–474. ISBN 9781111534394.