The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » General Data Questions » Calculating fixed and random effects
Re: Calculating Fixed Effects [message #18397 is a reply to message #18383] Fri, 22 November 2019 07:44 Go to previous messageGo to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3039
Registered: February 2013
Senior Member
Following is a response from DHS Research & Data Analysis Director, Tom Pullum:

"There are probably several ways to do this, but I suggest the following, using b16 in the BR file. Open a BR file and then insert these lines:

tab b16
keep if b16>0 & b16<.
gen nch=1
collapse (sum) nch, by(v001 v002 v003)
tab nch

This will give you the number of the women's children (of any age) who are living in the same household as her. You can attach this number to the woman's record with a merge, but in your analysis you probably want to use a file in which the children are the units, i.e. the BR or KR file. If you are using outcomes that are only in the KR file, you can apply these lines to that file, getting the number of children under 5 who are living in the same household as the mother."


We now have repositories of code written in Stata and SPSS available on Github. Please reference these code repositories as a resource for codes for matching or calculating DHS indicators. The code repositories can be found at:
https://github.com/DHSProgram/DHS-Indicators-Stata
https://github.com/DHSProgram/DHS-Indicators-SPSS

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Migration data: number of visitors
Next Topic: DHS phase in the 2014 Ghana DHS
Goto Forum:
  


Current Time: Thu Apr 25 06:16:46 Coordinated Universal Time 2024