# Random effects estimation

${\displaystyle y_{it}=x_{it}\beta +\alpha _{i}+u_{it},\,}$
where ${\displaystyle y_{it}}$ is the dependent variable, ${\displaystyle x_{it}}$ is the vector of regressors, ${\displaystyle \beta }$ is the vector of coefficients, ${\displaystyle \alpha _{i}=\alpha }$ are the random effects, and ${\displaystyle u_{it}}$ is the error term, then ${\displaystyle \alpha _{i}}$ should have a normal distribution with mean zero and a constant variance.
${\displaystyle {\widehat {\beta }}=(X'\Omega ^{-1}X)^{-1}(X'\Omega ^{-1}Y),}$
${\displaystyle {\widehat {\Omega }}^{-1}=\mathrm {I} \otimes \Sigma ,}$
where X and Y are the matrix version of the regressor and independent variable, respectively, ${\displaystyle \mathrm {I} }$ is the identity matrix, ${\displaystyle \Sigma }$ is the variance of ${\displaystyle u_{it}}$ and ${\displaystyle \alpha }$, and ${\displaystyle \Omega }$ is the variance-covariance matrix.