Why are the beta values provided in lmer() different than simple group means of observations? In a 2-level mixed-effect model, the equation for level-1 is 
$$Y_{ij} = \beta_{0j} + r_{ij}$$
where $\beta_{0j}$ is the mean outcome for the $j$-th group.
I ran the following model:
model.1 = lmer(score ~ (1|group), REML = T, data = data)
However, in the output from lmer(), I see that the beta values are slightly different than the means I compute by hand in Excel.
For example, my dataset has 3 groups of 20 observations each.  The 3 means of the observations that I calculate by hand in Excel are: 
9.118, 7.004, and 4.837.
However, by using the script: model.1@resp$mu, I learn that lmer() computed those same means as: 
9.040, 7.003, and 4.916.
It appears that lmer() is doing some sort of weighting to compute the beta values (the group means).  Can you help me understand how lmer() is computing these group means?  Ultimately, I'd like to be able to do the computation myself in Excel and arrive at the same beta values as lmer() provides.
 A: Mixed effects do not simply compute group means - if it did so you didn't have to use such model but could just compute the means.
First, notice that the model you described and your model specification in lme4 differ. In lme4 score ~ (1|group) translates to
$$Y_{ij} = \beta_{00} + b_{0j} + r_{ij}$$
where $\beta_{00}$ is an (fixed) intercept and $b_{0j}$ is a random intercept term. If you like to write the model you described in lme4, you should rather define it as
score ~ 0 + (1|group)
where 0 (or -1) translates to "no intercept" as in standard R formulas (check the Bates et al. paper on lme4). However notice that you should rather not drop the intercept from your model.
And now, answering your question, consider that your model is
$$Y_{ij} = b_{0j} + r_{ij}$$
while means the groups would be something like:
$$Y_{ij} = \overline{Y}_{j}$$
so the difference is that in mixed model you include information on both individual ($r_{ij}$) and group level ($b_{0j}$), while with computing means you are only interested in group level results. Mixed models were discovered to include both levels of variation in your model and not just group level variation (here you can find an example why you should not confuse individual and group level data).
If you include a higher level intercept terms (e.g. here $\beta_{00}$) then your model gets even more complicated then "group means".
For learning more I recommend you the following books:


*

*Snijders, T.A.B. and Bosker, R.J. (2012). Multilevel Analysis: An Introduction to Basic and Advanced Multilevel Modeling. London: Sage Publishers.

*Hox, J. (2010). Multilevel Analysis: Techniques and Applications. New York: Routledge.

*Gelman, A. and Hill, J. (2006). Data Analysis Using Regression and Multilevel/Hierarchical Models. Cambridge: Cambridge University Press.

*Pinheiro, J.C. and Bates, D.M. (2000). Mixed-Effects Models in S and S-PLUS. New York: Springer.

