[R] sampling weights in package lme4

Thomas Lumley tlumley at uw.edu
Tue Jan 24 20:41:30 CET 2012


On Tue, Jan 24, 2012 at 6:19 PM, Mohd masood <masood0805 at rediffmail.com> wrote:
>
> Dear All
> I am trying to include sampling weights in multilavel regression analysis using packege lme4 using following codes
>
> print(fm1 <- lmer(DC~sex+age+smoker+alcohol+fruits(1|setting), dataset,REML = FALSE), corr = FALSE)
> print(fm2 <- lmer(DC~sex+age+smoker+alcohol+fruits(1|setting), dataset,REML = FALSE), corr = FALSE,weights=sweight)
> The problem is both the codes giving me exactly the same results.is this "weights" not meant for sampling weights?if not, how can i include sampling weights in lme4?

It's not meant for sampling weights.  It's meant for precision
weights.  How best to include sampling weights in mixed models is a
research problem at the moment, but you can rely on getting the wrong
answer if you just use the weights= argument.

          -thomas

-- 
Thomas Lumley
Professor of Biostatistics
University of Auckland



More information about the R-help mailing list