The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Weighting data » creation of level 2 weights for multi level models (creation of level 2 weights for multi level models)
creation of level 2 weights for multi level models [message #18118] Sun, 22 September 2019 17:47 Go to next message
preshit is currently offline  preshit
Messages: 13
Registered: March 2018
Location: Tucson, AZ, USA
Member
Hello DHS Forum,
Apologies in advance for lengthy post. I am using NFHS-2 and 4 (DHS India survey rounds) for the district level analysis. I have pooled both the surveys and have created analytical data set. I have already traced back all the districts from latest survey on the previous one. I wish to use multi-level regression model to take account of nested structure of the data and use fixed effects at the desired level (i.e. District and PSU). I am aware of the fact that level 2 weights (in my case for district) can not be generated. So I decided to assume all the districts in each survey had equal probability of being selected since surveys covered almost all districts in the country that time. Thus, level 2 weight variable takes value of 1.

My mixed model command-

melogit `dv' `iv' || district: || psu:

runs fine without an error. However, when I use both level weights with svy command, i.e. level 2 weight (wgt2=1) and level 1 weight(wgt) (wgt is re-normalized as DHS experts recommend for pooled data sets)

cap drop wgt2
gen wgt2=1
svyset, clear
svyset district,weight(wgt2) || psu, weight(wgt)
svy: melogit `dv' `iv' || district: || psu:


I get and error:

"weights in variable wgt not constant within groups defined by: district psu"

As per State forum, it might be because the number of observations vary for each district for two time periods. See here-https://www.statalist.org/forums/forum/general-stata-di scussion/general/1460027-error-weight-not-constant-within-id

I have gone through all relevant posts on DHS forum but could not find satisfactory work around to the problem. We all are waiting for guidelines from DHS experts on this front. Meanwhile, I had following questions for you-
1. Shall I represent my results without weights as Gary Solon's paper suggests?
2. Is there any better alternative to create district level weight variable?
3. Do I need to modify my level 1 weights? even after re-normalizing them before appending? What will be that procedure and can anyone provide Stata codes?

Any help on these questions is appreciated. I have read most of the relevant posts on both normalizing weights and multi level models in this forum. However, if I have missed any which can help me resolving the issue,then please share it if possible. Thank you so much for your time.

Regards
Preshit

[Updated on: Sun, 22 September 2019 17:50]

Report message to a moderator

Re: creation of level 2 weights for multi level models [message #18240 is a reply to message #18118] Fri, 18 October 2019 13:11 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3210
Registered: February 2013
Senior Member

Following is a response from DHS Research & Data Analysis Director, Tom Pullum:

Sorry that it has taken so long to respond, but unfortunately we (on the DHS staff) cannot help. We still hope to be able to help with the general problem of separating the level 1 and level 2 weights, but we cannot suggest any work around at this time.

Re: creation of level 2 weights for multi level models [message #19041 is a reply to message #18240] Mon, 06 April 2020 09:21 Go to previous messageGo to next message
behayes4 is currently offline  behayes4
Messages: 24
Registered: February 2020
Member
Has there been a solution to this problem?
Re: creation of level 2 weights for multi level models [message #25017 is a reply to message #19041] Sat, 20 August 2022 04:12 Go to previous messageGo to next message
lucie_sbn is currently offline  lucie_sbn
Messages: 4
Registered: March 2022
Member
Hello,

Has a solution been found since?
Thank you very much in advance.

Best wishes,
Lucie
Re: creation of level 2 weights for multi level models [message #25031 is a reply to message #25017] Mon, 22 August 2022 08:17 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3210
Registered: February 2013
Senior Member

Following is a response from DHS Research & Data Analysis Director, Tom Pullum:

The error message you are getting may be another manifestation of a problem in a post that I just answered. Because the clusters are numbered separately within states, you need to generate a new cluster ID with a statement such as "egen cluster_ID=group(hv024 hv001)" and then use cluster_ID rather than hv001 as the PSU identifier.

All cases in the same cluster have the same weight (hv005). The error message you are getting could be due to having several clusters (in different states, with different weights) with the same value of hv001.

Of course the prefix hv could be v or mv, depending on which file you are using.
Previous Topic: Declaring Survey Design for dataset on STATA: NFHS-5 India 2019-2021
Next Topic: Confirming correct survey design
Goto Forum:
  


Current Time: Fri Dec 13 15:36:29 Coordinated Universal Time 2024