The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Weighting data » Melogit and Weights (Weighting Issues for multilevel models)
Re: Melogit and Weights [message #19741 is a reply to message #19740] Fri, 07 August 2020 10:04 Go to previous messageGo to previous message
Yawo is currently offline  Yawo
Messages: 45
Registered: February 2019
Member

Thanks again, I am able to avoid the error if I recreate the psu and strata taking sex/gender into account
as below:

egen psupool= group(idhspsu sample sex)
egen stratapool= group(idhsstrata sample sex)


Here is my model: svy: melogit condomless_spouse sex || psupool:

Here again is a brief listing showing constant weights within each psu.


. list sample sex idhspid idhspsu idhsstrata psupool stratapool weight in 1/20

     +----------------------------------------------------------------------------------------------------------+
     |      sample      sex                   idhspid      idhspsu   idhsstrata   psupool   strata~l     weight |
     |----------------------------------------------------------------------------------------------------------|
  1. | Angola 2015     male       2401    00010003  3   2401000001   2401000018         1        321    .979475 |
  2. | Angola 2015     male       2401    00010001  1   2401000001   2401000018         1        321    .979475 |
  3. | Angola 2015     male       2401    00010002  1   2401000001   2401000018         1        321    .979475 |
  4. | Angola 2015     male       2401    00010008  3   2401000001   2401000018         1        321    .979475 |
  5. | Angola 2015     male       2401    00010004  1   2401000001   2401000018         1        321    .979475 |
     |----------------------------------------------------------------------------------------------------------|
  6. | Angola 2015     male       2401    00010014  1   2401000001   2401000018         1        321    .979475 |
  7. | Angola 2015     male       2401    00010011  2   2401000001   2401000018         1        321    .979475 |
  8. | Angola 2015     male       2401    00010003  1   2401000001   2401000018         1        321    .979475 |
  9. | Angola 2015     male       2401    00010023  2   2401000001   2401000018         1        321    .979475 |
 10. | Angola 2015     male       2401    00010001  3   2401000001   2401000018         1        321    .979475 |
     |----------------------------------------------------------------------------------------------------------|
 11. | Angola 2015     male       2401    00010012  3   2401000001   2401000018         1        321    .979475 |
 12. | Angola 2015     male       2401    00010026  1   2401000001   2401000018         1        321    .979475 |
 13. | Angola 2015   female       2401    00010001 02   2401000001    240100018         2         18   1.001989 |
 14. | Angola 2015   female       2401    00010002 03   2401000001    240100018         2         18   1.001989 |
 15. | Angola 2015   female       2401    00010002 02   2401000001    240100018         2         18   1.001989 |
     |----------------------------------------------------------------------------------------------------------|
 16. | Angola 2015   female       2401    00010008 02   2401000001    240100018         2         18   1.001989 |
 17. | Angola 2015   female       2401    00010003 02   2401000001    240100018         2         18   1.001989 |
 18. | Angola 2015   female       2401    00010014 02   2401000001    240100018         2         18   1.001989 |
 19. | Angola 2015   female       2401    00010026 02   2401000001    240100018         2         18   1.001989 |
 20. | Angola 2015   female       2401    00010006 01   2401000001    240100018         2         18   1.001989 |
     +----------------------------------------------------------------------------------------------------------+

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Multilevel model for SPA data
Next Topic: using wieght, cluster, strata
Goto Forum:
  


Current Time: Sat Nov 23 05:34:36 Coordinated Universal Time 2024