Home » Data » Weighting data » Melogit and Weights (Weighting Issues for multilevel models)
Melogit and Weights [message #19633] |
Thu, 23 July 2020 09:38 |
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
|
|
|
|
|
Melogit and Weights
By: Yawo on Thu, 23 July 2020 09:38
|
|
|
Re: Melogit and Weights
|
|
|
Re: Melogit and Weights
By: Yawo on Thu, 06 August 2020 00:47
|
|
|
Re: Melogit and Weights
|
|
|
Re: Melogit and Weights
By: Yawo on Thu, 06 August 2020 12:15
|
|
|
Re: Melogit and Weights
|
|
|
Re: Melogit and Weights
By: Yawo on Fri, 07 August 2020 10:04
|
|
|
Re: Melogit and Weights
By: Yawo on Mon, 10 August 2020 11:01
|
|
|
Re: Melogit and Weights
By: BillC on Mon, 21 December 2020 21:12
|
|
|
Re: Melogit and Weights
By: Yawo on Tue, 22 December 2020 04:32
|
|
|
Re: Melogit and Weights
|
|
|
Re: Melogit and Weights
By: BillC on Tue, 22 December 2020 11:32
|
|
|
Re: Melogit and Weights
|
|
|
Re: Melogit and Weights
By: BillC on Tue, 12 January 2021 18:26
|
|
|
Re: Melogit and Weights
|
|
|
Re: Melogit and Weights
By: BillC on Wed, 13 January 2021 09:57
|
|
|
Re: Melogit and Weights
|
|
|
Re: Melogit and Weights
|
Goto Forum:
Current Time: Wed Nov 27 00:11:42 Coordinated Universal Time 2024
|