{{Short description|Statistical model}} {{Distinguish|Random coefficient model}}

{{Regression bar}}

In econometrics, a '''random effects model''', also called a '''variance components model''', is a statistical model where the model effects are random variables. It is a kind of hierarchical linear model, which assumes that the data being analysed are drawn from a hierarchy of different populations whose differences relate to that hierarchy. A random effects model is a special case of a mixed model.

Contrast this to the biostatistics definitions,<ref>{{cite book |first1=Peter J. |last1=Diggle |first2=Patrick |last2=Heagerty |first3=Kung-Yee |last3=Liang |first4=Scott L. |last4=Zeger |year=2002 |title=Analysis of Longitudinal Data |url=https://archive.org/details/analysislongitud00digg_730 |url-access=limited |edition=2nd |publisher=Oxford University Press |pages=[https://archive.org/details/analysislongitud00digg_730/page/n96 169]–171 |isbn=0-19-852484-6 }}</ref><ref>{{cite book |first1=Garrett M. |last1=Fitzmaurice |first2=Nan M. |last2=Laird |first3=James H. |last3=Ware |year=2004 |title=Applied Longitudinal Analysis |location=Hoboken |publisher=John Wiley & Sons |pages=326–328 |isbn=0-471-21487-6 }}</ref><ref>{{cite journal |first1=Nan M. |last1=Laird |first2=James H. |last2=Ware |year=1982 |title = Random-Effects Models for Longitudinal Data |journal=Biometrics |volume=38 |issue=4 |pages=963–974 |jstor=2529876 |doi=10.2307/2529876 |pmid=7168798 }}</ref><ref>{{cite journal |first1 = Joseph C. |last1 = Gardiner |first2=Zhehui |last2=Luo |first3=Lee Anne |last3=Roman |year=2009 |title = Fixed effects, random effects and GEE: What are the differences? |journal=Statistics in Medicine |volume=28 |issue = 2 |pages=221–239 |doi = 10.1002/sim.3478 |pmid = 19012297 }}</ref><ref>{{cite journal |last1=Gomes |first1=Dylan G.E. |title=Should I use fixed effects or random effects when I have fewer than five levels of a grouping factor in a mixed-effects model? |journal=PeerJ |date=20 January 2022 |volume=10 |article-number=e12794 |doi=10.7717/peerj.12794|doi-access=free |pmid=35116198 |pmc=8784019 }}</ref> as biostatisticians use "fixed" and "random" effects to respectively refer to the population-average and subject-specific effects (and where the latter are generally assumed to be unknown, latent variables).

==Qualitative description== Random effect models assist in controlling for unobserved heterogeneity when the heterogeneity is constant over time and not correlated with independent variables.<ref name=":0">{{Cite book|title=Econometric analysis of cross section and panel data|last=Wooldridge|first=Jeffrey|date=2010|publisher=MIT Press|isbn=978-0-262-23258-6|edition=2nd|location=Cambridge, Mass.|pages=252|oclc=627701062}}</ref> Two common assumptions can be made about the individual specific effect: the random effects assumption and the fixed effects assumption. The random effects assumption is that the individual unobserved heterogeneity is uncorrelated with the independent variables. The fixed effect assumption is that the individual specific effect can be correlated with the independent variables.<ref name=":0" />

If the random effects assumption holds, the random effects estimator is more efficient than the fixed effects model.

==Simple example== Suppose <math>m</math> large elementary schools are chosen randomly from among thousands in a large country. Suppose also that <math>n</math> pupils of the same age are chosen randomly at each selected school. Their scores on a standard aptitude test are ascertained. Let <math>Y_{ij}</math> be the score of the <math>j</math>-th pupil at the <math>i</math>-th school.

A simple way to model this variable is : <math> Y_{ij} = \mu + U_i + W_{ij},\, </math> where <math>\mu</math> is the average test score for the entire population.

In this model <math>U_i</math> is the school-specific '''random effect''': it measures the difference between the average score at school <math>i</math> and the average score in the entire country. The term <math>W_{ij}</math> is the individual-specific random effect, i.e., it's the deviation of the <math>j</math>-th pupil's score from the average for the <math>i</math>-th school.

The model can be augmented by including additional explanatory variables, which would capture differences in scores among different groups. For example: :<math> Y_{ij} = \mu + \beta_1 \mathrm{Sex}_{ij} + \beta_2 \mathrm{ParentsEduc}_{ij} + U_i + W_{ij},\, </math> where <math>\mathrm{Sex}_{ij}</math> is a binary dummy variable and <math>\mathrm{ParentsEduc}_{ij}</math>records, say, the average education level of a child's parents. This is a mixed model, not a purely random effects model, as it introduces fixed-effects terms for Sex and Parents' Education.

===Variance components=== The variance of <math>Y_{ij}</math> is the sum of the variances <math>\tau^2</math> and <math>\sigma^2</math> of <math>U_i</math> and <math>W_{ij}</math> respectively.

Let : <math>\overline{Y}_{i\bullet} = \frac{1}{n}\sum_{j=1}^n Y_{ij}</math> be the average, not of all scores at the <math>i</math>-th school, but of those at the <math>i</math>-th school that are included in the random sample. Let

:<math>\overline{Y}_{\bullet\bullet} = \frac{1}{mn}\sum_{i=1}^m\sum_{j=1}^n Y_{ij}</math>

be the grand average.

Let

:<math>SSW = \sum_{i=1}^m\sum_{j=1}^n (Y_{ij} - \overline{Y}_{i\bullet})^2 \, </math>

:<math>SSB = n\sum_{i=1}^m (\overline{Y}_{i\bullet} - \overline{Y}_{\bullet\bullet})^2 \,</math>

be respectively the sum of squares due to differences ''within'' groups and the sum of squares due to difference ''between'' groups. Then it can be shown {{Citation needed|reason=At least it should be referenced where a proof can be found.|date=September 2017}} that

:<math> \frac{1}{m(n - 1)}E(SSW) = \sigma^2</math>

and

:<math> \frac{1}{(m - 1)n}E(SSB) = \frac{\sigma^2}{n} + \tau^2.</math>

These "expected mean squares" can be used as the basis for estimation of the "variance components" <math>\sigma^2</math> and ''<math>\tau^2</math>''.

The <math>\sigma^2</math> parameter is also called the intraclass correlation coefficient.

== Marginal likelihood == {{Improve|reason=need to show formulas|date=April 2024}} For random effects models the marginal likelihoods are important.<ref>Hedeker, D., Gibbons, R. D. (2006). Longitudinal Data Analysis. Deutschland: Wiley. Page 163 https://books.google.com/books?id=f9p9iIgzQSQC&pg=PA163</ref>

==Applications== Random effects models used in practice include the Bühlmann model of insurance contracts and the Fay-Herriot model used for small area estimation.

==See also== *Bühlmann model *Hierarchical linear modeling *Fixed effects *MINQUE *Covariance estimation *Conditional variance *Panel analysis

== Further reading == * {{cite book |last=Baltagi |first=Badi H. |title=Econometric Analysis of Panel Data |location=New York, NY |publisher=Wiley |edition = 4th |year=2008 |isbn = 978-0-470-51886-1 |pages=17–22 }} * {{cite book |last=Hsiao |first=Cheng |title=Analysis of Panel Data |location=New York, NY |publisher=Cambridge University Press |edition = 2nd |year=2003 |isbn = 0-521-52271-4 |pages=[https://archive.org/details/analysispaneldat00chsi/page/n90 73]–92 |url=https://archive.org/details/analysispaneldat00chsi|url-access=limited }} * {{cite book |last=Wooldridge |first=Jeffrey M. |title=Econometric Analysis of Cross Section and Panel Data |url=https://archive.org/details/econometricanaly0000wool |url-access=registration |location=Cambridge, MA |publisher=MIT Press |year=2002 |isbn = 0-262-23219-7 |pages=[https://archive.org/details/econometricanaly0000wool/page/257 257–265] }} * {{cite journal |last1=Gomes |first1=Dylan G.E. |title=Should I use fixed effects or random effects when I have fewer than five levels of a grouping factor in a mixed-effects model? |journal=PeerJ |date=20 January 2022 |volume=10 |article-number=e12794 |doi=10.7717/peerj.12794|doi-access=free |pmid=35116198 |pmc=8784019 }}

==References== {{Reflist}}

==External links== *[http://teaching.sociology.ul.ie/DCW/confront/node45.html Fixed and random effects models] *[http://www.pitt.edu/~SUPER1/lecture/lec1171/012.htm How to Conduct a Meta-Analysis: Fixed and Random Effect Models]

{{DEFAULTSORT:Random Effects Model}} Category:Regression models Category:Analysis of variance