Would the correct code in stata be:

gen wgt=v005/1000000

svyset[pw=wgt], psu(v021) strata(v023xv025)]]>

I really don't know why the two procedures give you such different estimates, but since you will be proceeding with melogit, I recommend that you use the ICC estimate coming from melogit rather than from loneway.

]]>

I am working with Benin IR data to explore the factors associated with educational achievement (v106). My supervisor suggested that I check ICC value first since the data are clustered, and then choose between -logit- and -melogit- depending on whether the ICC is above the threshold of 0.15. Now it seems ICC can be calculated both before:

------------------------------------------------------------

. loneway v106, v021

Intraclass Asy.

correlation S.E. [95% Conf. Interval]

------------------------------------------------

0.25242 0.01320 0.22655 0.27829

------------------------------------------------------------

and after melogit:

------------------------------------------------------------

melogit v106, || v021:

esttat ICC

Level | ICC Std. Err. [95% Conf. Interval]

-----------------------------+------------------------------ ------------------

v021 | .3073749 .0158921 .2771332 .3393674

------------------------------------------------------------

As you can see, these two methods produce dissimilar results. Despite the necessity of using -melogit- being obvious, I'd like to know the right course of action to follow: before/after/both?

Thank you.

Dr Ghose

]]>

I am attaching a text file for my Stata program to calculate Myers' Blended Index for data in years. It also calculates an Unblended index, which is the same as the Index of Dissimilarity. It does it with either aggregated data or individual-level data. My old friend German Rodriguez modified it for his very useful website. I used iweights for the aggregated version and pweights (within svyset) for the individual-level version and mlogit. If you run the program you will see that it gives the same results with both approaches. Most of the time I would recommend the aggregated version, but it is possible to adapt the individual-level version for multivariate use, including covariates, confidence intervals, and statistical tests.

I don't quite understand what kind of heaping you are trying to measure for children age 0-47 months. Children's ages are obtained (or estimated) in different ways, depending on whether they are alive and in the household, or are only identified in the birth histories. Their age is given in completed months in the data file (e.g. with hw1) but that's calculated as the difference between date of interview and date of birth. The household respondents or mothers do not report age in completed months. If they did, wouldn't you expect heaping at multiples of 12 or 6 or possibly 3, rather than multiples of 10 or 5? The Index would have to be modified for 12 units rather than 10. Irregularities in month of birth can be the result of genuine seasonality of births, but there may also be some reporting preference for certain calendar months.

The purpose of the blending in Myers' Blended Index is to compensate for a typical gradient in the shape of the age distribution. Births by month in the past 4 or 5 years do not show much of a gradient. There is some gradient for surviving children, just because of the cumulative effect of mortality. I would probably just use the Index of Dissimilarity or fit a line with regression and add up the absolute deviations from the line.

]]>

I am trying to calculate Myers' blended index of digit preference for a child's reported age in months (variable: hw1) using India KR 2015-2016 data. I came across a stata command (by Germán Rodríguez and T. Pullum) that can calculate the index. However, to compute the index, I am not sure if I should be using v005 / sv005 as frequency weight or not. Can you please review my syntax and help me in correcting the command to calculate the index?

myers hw1 [fw=sv005], range(0 47) months gen(mw)

Also, if I choose to calculate the index without the buil in stata user command, can you please guide me on steps to be followed for calculating the myers' weight? I tried putting something together. Would be grateful if you can review the code below:

gen lastdigit = mod(hw1,10)

gen mw = 10

replace mw = hw1+1 if hw1 < 9

replace mw = 19-hw1 if hw1 > 9

replace mw = 29-hw1 if hw1 > 19

replace mw = 39-hw1 if hw1 > 29

replace mw = 49-hw1 if hw1 > 39

replace mw = 59-hw1 if hw1 > 49

replace mw = 0 if hw1 ==60

gen combow = v005 * mw

Thank you,

Mona

]]>

IDs are important to produce to identify respondents of questionnaire modules.

For each person the ID remains same in respondent ID column but for multiple questions the name of variable are mostly differentiated by putting $ symbol and then option number.

According to your description, forate of your data file seems verticle. But f=generally these are in horizontal formate.

If your expain more on your research question, i may be able to assist you better.

Regards.]]>

I ran a survey where each respondent answered 18 questions. I have it in excel so that each 18 rows of data describes the responses of 1 person (which is what I want). As I put the first column as the 'Response_ID', is it important to have all 18 questions associated with the same person with the same 'response ID', or is it better that each row has a different response ID despite being the same person? (When importing into Stata) thanks.]]>

The code repositories can be found at:

https://github.com/DHSProgram/DHS-Indicators-Stata

https://github.com/DHSProgram/DHS-Indicators-SPSS

]]>

I am working on Bangladesh DHS 2017-18 data to prepare a few community-level variables including access to different types of health facilites. More specifically, Table 15.7 & Table 15.8 of BDHS 2017-18 report. Is there any Stata code for replicating the table?

Thanks in advance.

SR]]>