The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » 2017 Ghana Maternal Health Survey (Total Pregnancy Outcomes)
Re: 2017 Ghana Maternal Health Survey [message #18025 is a reply to message #18024] Mon, 19 August 2019 15:50 Go to previous messageGo to previous message
lmallick is currently offline  lmallick
Messages: 22
Registered: June 2019
Member
Then I would try to collapse the BQ file to what would be the caseid in an IR file: qhclust qhnumber qline using a count of each of the dummy pregnancy variables that you could create using the line above.

Does this help:

use GHBQ7IFL.DTA, clear

gen wt = qweight/1000000

ta pregout, gen(pregout_dummy)
sort qhclust qhnumber qline
collapse (count) live = pregout_dummy1 ///
still = pregout_dummy2 ///
miscar = pregout_dummy3 ///
abor = pregout_dummy4 ///
, by(qhclust qhnumber qline)

save GHpregout.dta, replace

use GHIQ7IFL.dta, clear

merge 1:1 qhclust qhnumber qline using GHpregout

Once merged, you could create a binary variable for ever had an abortion (Y/N) if abor is greater than or equal to 1. Then you could cross tab with q578_1.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Family Planning in young women
Next Topic: Merging dataset (IR and KR) of Pakistan 2017-18
Goto Forum:
  


Current Time: Tue May 14 12:11:19 Coordinated Universal Time 2024