[R-sig-ME] How to “weight” measurements (family means)?

Douglas Bates bates at stat.wisc.edu
Tue Feb 19 16:11:18 CET 2008


On Feb 19, 2008 9:01 AM,  <demont at access.uzh.ch> wrote:
> Dear all,

> I have recently started working with the lme4 package and its lmer function.
> My data file is based on family means. I do not have the row data for the
> individuals but I do know for every family on how many individuals the
> family means are based (i.e. how many individuals per family I have
> measured).

> How can I fit a mixed-effects model to this data with lmer so that my family
> means are weighted with an appropriate weighting factor (i.e. weights my
> family means according to the number of offspring per family measured for
> this family = more weight for family means that are based upon many
> individuals, because I have more confidence in this measurements)?? Does
> this involve using the optional vector "weights"??

Yes.  You should be able to use the vector of family sizes as the
argument to weights - at least in the development version - the one
accessible via

install.packages("lme4", repos = "http://r-forge.r-project.org")

Please check which version of the lme4 package you are using with
sessionInfo() and report that if you encounter difficulties.

> Despite going through the reference manual, the vignettes and the
> R-sig-mixed-models archives I did not find a clear answer to this very
> fundamental problem and would hence be deeply grateful for a specific and
> detailed answer!

Yes, the current documentation for the lme4 package is, shall we say,
"casual".  I'm working on it.




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