[R-sig-ME] Methodological and practical issues about survey weights using lme4

James Pustejovsky jepu@to @end|ng |rom gm@||@com
Mon Jul 5 19:19:46 CEST 2021


Fernando,

Again, I think lmer does not handle survey weights, even at level 1. The weights argument is for precision weights (not sampling weights). From ?lmer: "The diagonal of the residual covariance matrix is the squared residual standard deviation parameter sigma times the vector of inverse weights."

If your analysis is about relating country-level features to country-level predictors, and you are unsure about an appropriate weighting strategy, then perhaps you could simplify things by aggregating to the country level. You could use the (level-1) survey weights to generate estimates of the population mean outcome in each country, along with a sampling variance for each country’s estimate. Then estimate the country level regression, or use meta-regression to account for the different sampling variances of the estimates from each country.

James

> On Jul 5, 2021, at 4:42 AM, Fernando Pedro Bruna Quintas <f.bruna using udc.es> wrote:
> 
> 
> Dear James and list members, 
>  
> Thank you very much for pointing me out to WeMix. That is a very interesting package. As an aside, I still do not understand why we might need clustered standard errors in multilevel models, as in WeMix or Stata (I would appreciate any thought). However, let me go back to my original question. 
>  
> I am realizing that I do not need level-two weights. My level two are European countries. That is not a sample, but all the available countries. Therefore, I do not need level-two weights, as in the case of a random sample of schools. I may use the argument weights in lmer() to consider level-one weights. However, I would appreciate a confirmation of that, given that there has been some discussion in internet about this option in lme4 package. I am considering using the survey weights and transform them to sum to 1 in my sample after ignoring missing data. Is this right? 
>  
> My other question was more general. I am studying contextual effect. I understand that if I use weights I will give more importance to big countries. However, the analysis of contextual (cultural) effect might require ignoring weights, in order to give more importance to small countries. Any thought? 
>  
> I know that the discussion about weights is deep and there are dozens of internet links about that. Therefore, I apologize to ask again about this confusing topic. I would be grateful for some advice. 
>  
>  
> Thanks again, 
>  
> Fernando 
> 
> 
> De: James Pustejovsky <jepusto using gmail.com>
> Enviado: lunes, 5 de julio de 2021 1:02
> Para: Fernando Pedro Bruna Quintas <f.bruna using udc.es>
> Cc: r-sig-mixed-models using r-project.org <r-sig-mixed-models using r-project.org>
> Asunto: Re: [R-sig-ME] Methodological and practical issues about survey weights using lme4
>  
> My understanding is that lme4 does not accommodate survey weights. But check out the WeMix package for an alternative: https://cran.r-project.org/package=WeMix
> 
> I learned about WeMix when I posted a query on Twitter very similar to your question (https://twitter.com/jepusto/status/1408084119884599299?s=21).
> 
> Kind Regards,
> James
> 
>>> On Jul 4, 2021, at 11:20 AM, Fernando Pedro Bruna Quintas <f.bruna using udc.es> wrote:
>>> 
>> 
>> 
>> Dear list members,
>> 
>> I have two questions about the use of survey weights in multilevel models.
>> 
>> I have estimated a multilevel model about the effects of individual and cultural variables in well-being, using the European Social Survey. By “culture” I mean national aggregates of my level-1 indicators. Think of Yij as an indicator of wellbeing, Xij as an indicator of being individualistic (for instance) and Xj as the sample country mean of individualism, representing the degree of individualism in a national culture (contextual effect).
>> 
>> I have estimated the following simplified model:
>> lmer( Yij  ~ (Xij-Xj) + Xj + (1 | country) ) , data=databank)
>> 
>> A referee makes me the following comment: “Post stratication weights at individual level and at the higher-level national variables is a relevant issue. This issue of importance on MLM context as Stata instructions note https://www.stata.com/features/overview/multilevel-models-with-survey-data/. The authors seem to be using R but I would assume it includes similar options to include weights to all levels of the analysis. The literature on MLM includes recommendations for Fitting multilevel models in complex survey data with design weights and this needs to be referred and selection of weights justified.”
>> 
>> The information about weights in the survey I am using is in the following link:
>> https://www.europeansocialsurvey.org/methodology/ess_methodology/data_processing_archiving/weighting.html
>> 
>> My questions are the following:
>> 
>>  1.  A first questions is about general methodology, though applied to the analysis of the effects of level-two variables. I would appreciate references or links about when is appropriate to use survey weights, depending on the research question. I have data on 23 countries. My goal is to measure the effects of level-two (cultural variables). Therefore, I am not so much interested on concluding about big countries (Russia has 145 million of people!). I need variance to differentiate cultural effects in Belgium, Netherlands... However, If I do not use weights my conclusions are only about the particular sample published by the European Social Survey. Any thought?
>>  2.  Apart from that, and more generally for any other study, I would appreciate comments and references about using survey weights in lme4. I understand that I would have to change the calculation of all may level-one variables, which are defined as deviations to the national means. Additionally, I must consider reweighting national means of those variables, as well as other level-two variables. The estimation procedure has to be weighted... I would appreciate any practical comment about weighted estimation using survey data and lme4.
>> 
>> Thank you very much,
>> 
>> Fernando Bruna
>> Department of Economics
>> University of A Corunha (Coruña), Spain
>> 
>> 
>>    [[alternative HTML version deleted]]
>> 
>> _______________________________________________
>> R-sig-mixed-models using r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

	[[alternative HTML version deleted]]



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