The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Combining mother's info on child row in PR file
Combining mother's info on child row in PR file [message #11333] Mon, 05 December 2016 14:20 Go to previous message
lillo?S is currently offline  lillo?S
Messages: 24
Registered: December 2015
Member
Hi, from the MLPR41FL file I am trying to paste the information of the mother on the child's row using a function that I've written in R. In other words, I find the mother in the household if available (idmother) and then copy the mother's age (agemother) for each member under 17 years old having a mother in the hh (idmother is not NA). I was checking the values of agemother and I find children under 17 who have mothers who are 0 or 1 years old or even 89 or 90 years old, which does not make sense of course.
This is an extract of the dataset:

hhi​d ​hv105 hv112 hvidx idmother agemother
#1 302102 1 66 NA 1 NA NA
#2 302105 1 74 NA 1 NA NA
#3 302105 1 53 NA 2 NA NA
​​#4 302105 1 0 2 3 2 53
#5 302105 1 14 2 4 2 53
#6 302105 1 10 0 5 NA NA
#7 302105 1 0 3 6 3 0
#8 303 7 1 25 NA 1 NA NA
#9 303 11 1 40 NA 1 NA NA
#10 303 11 1 35 NA 2 NA NA
#11 303 11 1 12 2 3 2 35
#12 303 11 1 0 2 4 2 35
#13 303 13 4 75 NA 1 NA NA
#14 303 16 1 32 NA 1 NA NA
#15 303 16 1 16 NA 2 NA NA
#16 303 16 1 53 NA 3 NA NA

​As you can see in household 302105 1 the observation #7 is 0 years old (hv105), the id of his/her mother (idmother) is 3, which is obs #4, who is 0 years old (hv105). Basically the function that I used to get the variable agemother is doing its job, but there might be inconsistencies in the data.
Let's assume that women can have children from 10 to 60, there are 419 children who have mothers who are either below 10 or above 77.

I find the same in other surveys and for other years, thereby finding that a child has a mother who is 1 or 2 or even 89 or 90 years old.

​Any ideas on what can have happened here?

Thanks.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: combinning three files into one file
Next Topic: Child's weight in Kg (1 decimal) variable in SAS
Goto Forum:
  


Current Time: Sat Apr 27 09:29:52 Coordinated Universal Time 2024