[R-sig-ME] Weighting analysis in Lme4

Ben Pelzer b.pelzer at maw.ru.nl
Fri Dec 9 13:03:55 CET 2016


Dear Justine and Ben,

I compared results from using option pweight in Stata, which is for 
sampling weights or inverse probability weights, with results from lmer 
and the "weights=" option.  I transformed the weights with method A 
described by Carle in:

http://bmcmedresmethodol.biomedcentral.com/articles/10.1186/1471-2288-9-49

The lmer and Stata results were exactly the same, for the fixed effects, 
their standard errors and the random effects.

However, method B described by Carle, produced different results in 
Stata and lmer.

So my conclusion is that with method A, lmer produces correct results. 
Hope this helps a bit... Kind regards,

Ben.


On 9-12-2016 2:26, Ben Bolker wrote:
>    Hopefully someone else will respond as well, but:
>
>    As I understand it combining survey weighting with lme4's
> regression-based approach is tricky.  lme4's weights argument does *not*
> (again as I understand it, this isn't my area) correspond to sample weights.
>
> If you google "site://stat.ethz.ch/pipermail/r-sig-mixed-models/ survey
> weights" you'll find a lot of discussion on the list, e.g.
>
> https://stat.ethz.ch/pipermail/r-sig-mixed-models/2014q4/022795.html
>
>    Anyone have any new insights into this problem?
>
>    Ben B.
>
> On 16-12-08 03:25 PM, justine briaux wrote:
>>   Dear Mr Bolker,
>>
>> I am a PHD student in Public Health and I am currently working on data
>> collected with a  complex survey design. These data were collected in 5
>> different districts/ strata (codpref) and 162 villages/cluster (numvill).
>> In each village a representative sample of mother-infant pairs was
>> surveyed. Some mother-infant pairs come from the same household (household=
>> idmen).
>> In order to consider those three interlocked levels I've done mixed model
>> using the lme4 package in R
>>
>> glmer(undernutrition~household food insecurity+(1|codpref)+(1|numv
>> ill)+(1|idmen),data=menme,family=binomial)
>>
>> I am wondering if I should weight my analysis in order to take into account
>> the survey weights (pond) as the "survey package" would have done it.
>>
>> I saw in the R documentation that the argument "weight" exist in the lme4
>> package, does it correspond to survey weights? For instance, would it be
>> correct to write:
>>
>>   glmer(undernutrition~household food
>> insecurity+(1|codpref)+(1|numvill)+(1|idmen),data=menme,
>> weight= pond, family=binomial)
>>
>> I wanted to use the survey package but it does not allow me to do a mixed
>> model and thus to take into accound the household level (idmen).
>>
>> I am really confused. What should I do?
>>
>>
>> Thanks a lot for your help.
>> Looking forward to hearing from you.
>>
>> Warm regards.
>>
>> Justine Briaux
>> PHD student
>> IRD, France
>>
>> <r-sig-mixed-models at r-project.org>
>>
>> 	[[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-mixed-models at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models



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