creation of level 2 weights for multi level models [message #18118] |
Sun, 22 September 2019 17:47 |
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 #25031 is a reply to message #25017] |
Mon, 22 August 2022 08:17 |
Bridgette-DHS
Messages: 3208 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.
|
|
|