The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » India » Fertility preference (table 4.19.1)
Fertility preference (table 4.19.1) [message #26448] Tue, 21 March 2023 12:14 Go to next message
Sourav_ is currently offline  Sourav_
Messages: 20
Registered: January 2021
Member
it is based on fertility preference of India.
Re: Fertility preference (table 4.19.1) [message #26449 is a reply to message #26448] Tue, 21 March 2023 12:17 Go to previous messageGo to next message
Sourav_ is currently offline  Sourav_
Messages: 20
Registered: January 2021
Member
I want to replicate table 4.19.1 (Indictors of sex preference: Women) of NFHS-5 Of India. Especially two columns of table 4.19.1 i.e., "Percent who want more sons than daughters" and "Percent who want more daughters than sons ". I am unable to make the STATA code for this. Can you please help me out?
Re: Fertility preference (table 4.19.1) [message #26459 is a reply to message #26449] Wed, 22 March 2023 12:34 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3199
Registered: February 2013
Senior Member
Following is a response from Senior DHS staff member, Tom Pullum:

I will post below some Stata lines that describe how I would calculate the bottom line of the table, but I don't match the table either. My n for the table is about 20,000 cases too high, and several of the means or percentages are off.

I don't know how to interpret "either sex", but this should not explain why I do not match the mean ideal number of boys (I get 1.0; the table gives 1.1) but I do match the mean number of girls (I get 0.9 and the table gives 0.9). I am off for both of the percentages you asked about. The footnote says to omit (from the entire table) cases with non-numeric responses to the ideal number of children or sons or daughters. I did this, with or without also dropping from the table the cases with non-numeric responses to "either sex", but nothing gives a match.

I am not motivated to put more effort into trying to match the table. This is probably just another problematic table in the NFHS-5 report. If you want to do further research on this topic, I suggest that you use your own coding and ignore the final report table. If anyone else can get a match, please post your code.

use " IAIR7DFL.DTA", clear
* No idea what v629 means

gen     ch=v613 if v613<96 & v627<96 & v628<96 & v629<96
gen   boys=v627 if v613<96 & v627<96 & v628<96 & v629<96
gen  girls=v628 if v613<96 & v627<96 & v628<96 & v629<96
gen either=v629 if v613<96 & v627<96 & v628<96 & v629<96

label variable ch    "Ideal number of chv613<96 | v627<96 | v628<96ildren"
label variable boys  "Ideal number of boys"
label variable girls "Ideal number of girls"

gen bgpref=.
replace bgpref=1 if boys>girls & boys<.
replace bgpref=2 if boys==girls & boys<.
replace bgpref=3 if boys<girls & girls<.

label define bgpref 1 "more boys" 2 "same number" 3 "more girls"
label values bgpref bgpref

gen more_boys=0 if bgpref<.
replace more_boys=100 if bgpref==1

gen more_girls=0 if bgpref<.
replace more_girls=100 if bgpref==3

gen any_boys=0 if boys<.
replace any_boys=100 if boys>0 & boys<.

gen any_girls=0 if girls<.
replace any_girls=100 if girls>0 & girls<. 

tab bgpref [iweight=v005/1000000]

tabstat boys girls either more_boys more_girls any_boys any_girls [fweight=v005], statistics(mean) format(%6.1f)

Re: Fertility preference (table 4.19.1) [message #26475 is a reply to message #26459] Fri, 24 March 2023 05:05 Go to previous message
Sourav_ is currently offline  Sourav_
Messages: 20
Registered: January 2021
Member
Thank you very much for your kind help.
Previous Topic: domestic violence weights at psu level
Next Topic: k fold cross validation for logistic regression in R
Goto Forum:
  


Current Time: Fri Nov 29 10:53:27 Coordinated Universal Time 2024