[R-sig-ME] Fwd: [Lme4-authors] LME4 and Lmer model

Ben Bolker bbolker at gmail.com
Wed Oct 1 02:15:19 CEST 2014

Ken Beath <ken.beath at ...> writes:

> The BY statement in SAS has nothing to do with BLUP, it simply runs an
> analysis separately for each group defined by BY. The empirical BLUP
> predicts the values of the random effect for each group taking into
> consideration all the data.
> There is a command in SAS for extracting the random effect predictions
> which I would hope gives the same results as ranef in R.
> Ken

  For what it's worth, in addition to the variety of different
packages that provide generic strategies for dealing with grouped data
in R (plyr::ddply, dplyr::group_by, data.table ...), lme4 has an
lmList() function (as does nlme -- they're almost but not quite
compatible/identical) for this specific task (fitting linear models
to each of a variety of groups).

  Ben Bolker

More information about the R-sig-mixed-models mailing list