[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: gllamm with pweights

From   "Kanter, Rebecca" <>
To   "" <>
Subject   RE: st: gllamm with pweights
Date   Thu, 16 Jul 2009 15:08:46 -0400

Thanks Steven, these resources are a big help.

I am now trying to apply this method to my 2 level model (L1 = individual L2 = urban or rural part of state they live in; 64 units based on 32 states).

In the method by Chantala et al, if I am interpreting this correctly...the PSU takes on a new meaning here (from the original complex survey design)...

whereby PSU_wtj = 1 / Pr(urstate j selected) --> so if I am including all urban and rural parts of states (i.e. all 64 units that in turn make up the 32 states in a country) then is 1 for every urstate ?

Furthermore, then, if FSU_wt i|j = 1 / Pr(person i selected / urstate j selected) then is FSU_wt i|j = 1 / Pr ( (1 / total number of people in urstate j) / 1) as in their example with schools = j each "student selected from school j will have a sampling weight equal to the number of students within school j represented by that student."?

And in the end the original survey individual pweight is not used?

Thanks so much for all your help,

Rebecca M. Kanter
PhD Candidate
Johns Hopkins Bloomberg School of Public Health
Department of International Health
Center for Human Nutrition
From: [] On Behalf Of []
Sent: Thursday, July 16, 2009 12:24 PM
Subject: Re: st: gllamm with pweights


Also, see: and
These contain links to the Stata program -pwigls- which will scale the
weights.  Rabe-Hesketh and Skrondal (2006), the second citation that
Stas listed, compute the  "Method 1" weights by hand and illustrate an
analysis in GLLAMM.

Rabe-Hesketh, S. & Skrondal, A. (2006). Multilevel modelling of
complex survey data. Journal of the Royal Statistical Society: Series
A (Statistics in Society), 169(4), 805-827.

On Thu, Jul 16, 2009 at 12:28 PM, Stas Kolenikov<> wrote:
> Oh, I see. With 64 second level units, you are in a much better shape.
> I would probably have an urban/rural dummy as an explanatory variables
> for those second levels with -feq- option.
> If you sum up the weights, you are using the weights twice. And that's
> hardly a great idea: you are overcompensating for unequal
> probabilities of selection, if there were any. Were these
> states/ruran/urban areas selected via a sampling procedure? Or what
> you have is a complete list? In the latter case, you surely would need
> to specify unit weights at the second level.
> On the issue of weights in multilevel models, see:
> There's probably
> more by now, but I am not tracking this literature very closely.
> On Thu, Jul 16, 2009 at 11:18 AM, Kanter, Rebecca<> wrote:
>> Hi Stan and statalist,
>> Regarding my second level it is more than 2 there are 32 states in the country...that makes 64 values (or areas/clusters that i illustrate via one variable called urstate...e.g. if urstate=1 it is the urban area of the 1st state and if urstate=33 it is the rural area of the 1st state and so on) if one divides each state into its urban and rural areas, respectively. Each one I want to take its own intercept and slopes etc to better account and visualize the urban and rural differences in the country....
>> Thus, is it better to sum the individual weights per urstate (1-64) or let all weights for this second level equal one and keep my individual pweights as is for the individual level (level 1)?
>> From: []
>> On Wed, Jul 15, 2009 at 5:37 PM, Kanter, Rebecca<> wrote:
>>> Hi,
>>> I am running 2 level multi-level models using gllamm. Level one is individuals and Level two is either the urban or rural part of the country's state (i.e. urstate).
>>> I would like to use the survey pweights I have...I only have pweights for the individual level (adul_sr), but it seems that you need pweights for all levels specified in gllamm (?) so this is what I did to create pweights for urstate based on these weights:
>>> collapse (sum)  sadul_sr=adul_sr , by(urstate)
>>> then I merged them to the rest of my dataset
>>> and made this weight for the gllamm:
>>> *MLM-level pweights
>>> generate pwadulsr1=adul_sr
>>> *urstate summed adul_sr
>>> generate pwadulsr2=sadul_sr
>>> Then ran the most basic random-intercept only (around urstate) in gllamm and get the follow error below and am assuming it is a pweight problem but I do not know where the problem is coming from so if anyone has insight that would be much appreciated. Thanks so much!
>>> (note: diettag==1 & exwt==1 is the subpopulation i want to look at for this series of models)
>>> gllamm bmi2 if diettag==1 & exwt==1, i(urstate) pweight(pwadulsr) adapt nip(15)
>>> Running adaptive quadrature
>>> Convergence not achieved: try with more quadrature points
Steven Samuels
18 Cantine's Island
Saugerties NY 12477

*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index