The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » General » Tell me how to manipulate child data
Tell me how to manipulate child data [message #15156] Sat, 09 June 2018 10:36 Go to next message
hmorishita is currently offline  hmorishita
Messages: 1
Registered: June 2018
Member
Hello!
I'd like to construct a var indicating the number of children born before age 20 of mother's.
Thank you for telling me how I can construct them.

Best regards
Re: Tell me how to manipulate child data [message #15312 is a reply to message #15156] Wed, 27 June 2018 16:50 Go to previous message
Liz-DHS
Messages: 1516
Registered: February 2013
Senior Member
A response from Technical Specialist, Dr. Shireen Assaf,
Quote:

Dear user,
You would need to use the BR or KR file and code the variable to obtain the number in the following way. BR is all births and KR are births in the last five years. I call the variable child420 which gives the number and percentage of children born before the mother was age 20.

Stata code:
gen agem=b3-v011
gen agemyr = int((agem) / 12)
gen childb420=0
replace childb420=1 if agemyr<20
ta childb420

Thank you.

Best,

[Updated on: Wed, 27 June 2018 16:51]

Report message to a moderator

Previous Topic: PR file Problem
Next Topic: Child Development variables
Goto Forum:
  


Current Time: Thu Mar 28 05:42:21 Coordinated Universal Time 2024