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? thanks a lotmasood Follow Rediff Deal ho jaye! to get exciting offers in your city everyday. [[alternative HTML version deleted]]
Mohd masood <masood0805 <at> rediffmail.com> writes:> I am trying to include sampling weights in multilevel 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?Can you please re-post this on the r-sig-mixed-models <at> r-project.org mailing list, preferably with a reproducible example <http://tinyurl.com/reproducible-000> ? Ben Bolker
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