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)
Melogit and Weights [message #19633] Thu, 23 July 2020 09:38 Go to previous message
Yawo is currently offline  Yawo
Messages: 45
Registered: February 2019
Member
Hello,

I am trying to fit a multilevel model examining HIV risk behaviors among those living with HIV using a pooled data from 23 countries.

My model nests individuals (level 1) into clusters (level 2). For melogit, I am aware I need to set weights at the two levels of my analysis, yet DHS only provides one weight.

From my review of forum here ( https://userforum.dhsprogram.com/index.php?t=msg&goto=13 522&&srch=multilevel+weights#msg_13522), I understand I can svyset my data, using the following:

gen weight=hiv05/1000000
gen weight2=1
svyset idhspsu, weight(weight) strata(idhsstrata) singleunit(centered) || _n, weight(weight2)


When I run my basic melogit, <svy: melogit condomless_spouse sex || idhspsu: >

I get the following error: "weights in variable weight not constant within groups defined by: idhspsu an error occurred when svy executed melogit"

I am sure I may not be doing something wrong here. I would be very grateful if any of you could point me in te right direction.

Thanks in advance of your assistance.

cY

[Updated on: Thu, 23 July 2020 09:39]

Report message to a moderator

 
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 02:22:17 Coordinated Universal Time 2024