The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » Myers blended index
Myers blended index [message #22523] Wed, 24 March 2021 16:14 Go to previous message
mona
Messages: 5
Registered: January 2020
Member
Dear DHS colleagues,

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
 
Read Message
Read Message
Previous Topic: Multiple rows same person
Next Topic: Calculating ICC
Goto Forum:
  


Current Time: Thu Dec 19 08:14:01 Coordinated Universal Time 2024