Home » Data » IPUMS Demographic and Health Surveys (IPUMS-DHS) » Melogit and Weights
Re: Melogit and Weights [message #19636 is a reply to message #19635] |
Thu, 23 July 2020 17:09 |
BillC
Messages: 6 Registered: July 2020
|
Member |
|
|
Hi Trevor,
Am facing the same issue as Yawo. I am examining a multilevel model in Afghanistan and want to run a random intercept model with region (v024) as the second level.
A) Here is my code (based on Shireen's post):
gen wt=v005/1000000
gen wt2=1
svyset region, weight(wt) strata(v023) , singleunit(centered) || _n, weight(wt2)
Stata output follows:
Note: Stage 1 is sampled with replacement; further stages will be ignored for variance estimation.
pweight: <none>
VCE: linearized
Single unit: centered
Strata 1: v023
SU 1: region
FPC 1: <zero>
Weight 1: wt
Strata 2: <one>
SU 2: <observations>
FPC 2: <zero>
Weight 2: wt2
B) Here is the Stata output for the svy: melogit model
(running melogit on estimation sample)
weights in variable wt not constant within groups defined by: region
an error occurred when svy executed melogit
C) Here is the output of the code you suggested to check if there is variation in the min/max of wt2:
wt2 | Freq. Percent Cum.
------------+-----------------------------------
1 | 29,461 100.00 100.00
------------+-----------------------------------
Total | 29,461 100.00
Thoughts?
Thanks!
|
|
|
Goto Forum:
Current Time: Fri Nov 22 05:41:51 Coordinated Universal Time 2024
|