How is it meaningful to give fitted values for random effects if they don't appear in the likelihood function? Software for fitting random effects models tends to output values for the random effects. For example, suppose the model is
$$y_i = \alpha_i + \varepsilon_i, \qquad 1 \le i \le n$$
where
$$\alpha_i \sim N(\mu_\alpha, \sigma_\alpha^2)$$
and
$$\varepsilon_i \sim N(0, \sigma^2)$$
If you fit this with software, you will get estimated values for the $\mu_\alpha, \sigma_\alpha, \sigma$... and also $\alpha_i$. I can see how these might be calculated. For example, if you use Gibbs sampling to fit the model then you get values of $\alpha_i$ for free. But I cannot see how the $\alpha_i$ are meaningful. The likelihood function (I may be wrong about this) is
$$\mathrm{const.} \times\int_{\alpha_1, \ldots, \alpha_n} \prod_i d_N(y_i, \alpha_i, \sigma)d_N(\alpha_i, \mu_\alpha, \sigma_\alpha)$$
where $d_N(x, m, s) = \frac{1}{s}\exp(-(x-m)^2/2s^2)$. Since there is an integral over the $\alpha_i$, how can they possibly have ``fitted values" when they aren't parameters of the model at all?
Some things which might have gone wrong:


*

*My likelihood function is wrong and the $\alpha_i$ do appear in the correct likelihood.

*The fitted values of $\alpha_i$ have some other meaning which I don't understand.

*If I believe the likelihood principle, I should ignore the $\alpha_i$ altogether.


This must be a common question but I wasn't sure where to search for it.
 A: One thing before your question: The example model you provided is maybe not the best example, since you have a random effect ($\alpha_i$) and an error term ($\epsilon_i$) per observation. Therefore, these two components cannot be distinguished and hence $\sigma^2_{\alpha}$ and $\sigma^2$ cannot be uniquely determined (their sum should be about right, but how that sum is split up will be arbitrarily decided based on the characteristics of the estimation algorithm used -- so, different software may give you different estimates, even though the log likelihood will be the same).
Regardless, your question is essentially about best linear unbiased prediction (BLUPs). A good starting point would be the corresponding Wikipedia article. A very thorough article about BLUPs is the paper by Robinson (1991):
Robinson, G. K. (1991). That BLUP is a good thing: The estimation of random effects. Statistical Science, 6(1), 15-32. http://projecteuclid.org/euclid.ss/1177011926
You are right, the random effects do not appear in the likelihood, as they are integrated out. However, we can still obtain estimates for these values (some people prefer to speak of 'predictions' instead of 'estimates' for the random effects). There are various derivations and hence, interpretations of the meaning of these values (see Robinson, 1991), such as the modes of the posterior distributions.
