[R-sig-ME] R-sig-mixed-models Digest, Vol 92, Issue 45

Corey Sparks corey.sparks at utsa.edu
Fri Aug 29 17:55:22 CEST 2014


This is something that I encounter a lot in my own work. I’m guessing you’re like me and you’re not interested in prediction, but you are interested in making sure your regression coefficients are correctly estimated using survey design weights, and your standard errors for these are also corrected for survey design (clustering/stratification). There was a thread about this last year that I contributed to. Here is the link to that:
https://stat.ethz.ch/pipermail/r-sig-mixed-models/2014q2/021994.html

I made an example and put it on Rpubs:
http://rpubs.com/corey_sparks/27276

Let me know if this helps
Best,
Corey

Corey Sparks
Associate Professor
Department of Demography
College of Public Policy
501 West Cesar E Chavez Blvd
Monterrey Building 2.270C
San Antonio, TX 78207
corey.sparks 'at' utsa.edu
coreysparks.weebly.com


> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Fri, 29 Aug 2014 09:23:05 +0100
> From: Rodrigo Travitzki <r.travitzki at gmail.com>
> To: r-sig-mixed-models at r-project.org
> Subject: Re: [R-sig-ME] multilevel analysis with sample weighted data
> Message-ID: <54003869.70904 at gmail.com>
> Content-Type: text/plain; charset=windows-1252; format=flowed
> 
> On 28-08-2014 14:52, Ben Bolker wrote:
>> On 14-08-28 07:01 AM, Rodrigo Travitzki wrote:
>>> Dear R masters,
>>> I'm looking for a R package to do multilevel analysis of a weighted data
>>> (is a weigthed sample of brazilian educational data) but could not find
>>> it. There is just a "weights" option in lme(), but is not about
>>> frequency (or probability) weigths in data. In some foruns, no response
>>> either.
>>> So, could you please confirm this information for me? There is any R
>>> package/function which do this? I really don't want to use proprietary
>>> software, but if there is no option, I'll need to do so.
>>> Thank you very much.
>>> 
>>> Best wishes,
>>> Rodrigo Travitzki
>>   It depends a little bit what you want to do/the meaning of the
>> weights.  I have successfully used weights=varFixed(~I(1/n))
>> [inverse-variance weighting based on the number of samples per group] in
>> lme; alternatively, you could use weights=n in lmer (from the lme4
>> package) to get an equivalent result.
>> 
>> If you want to deal with survey weighting, the story seems to be
>> considerably more complicated -- I don't claim to understand it, but
>> Andrew Gelman (a fairly prominent applied Bayesian statistician) claims
>> that it's "a mess" (to use his phrase).  If the weights represent
>> probability of inclusion in a survey, I believe he would recommend
>> model-based inference -- that is, fit an unweighted multilevel
>> regression model and then use post-stratification/weighting to make
>> predictions (see http://andrewgelman.com/?s=survey+weights for various
>> discussion and links to papers).
>> 
>>   good luck,
>>     Ben Bolker
>> 
>> _______________________________________________
>> R-sig-mixed-models at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> 
> Thanks, Ben!
> 
> It seems the problem is far more deeper than I expected.. Now I'm 
> wondering how can this issue be so 'easy managed' in some proprietary 
> softwares, like MLwiN, where you just need to insert the weights and voil?!
> Anyway, I will read carefully the link you sent and see what can be done.
> 
> Rodrigo
> 
> 
> 



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