Hi all,
I'm a beginner of Stata user. I'm struggling with my dataset. I have four variables: household id, member id, momloc (telling you who is the mother of children in a family), age, child_age. I want to create a variable of the mother's age (mom_age) that tells me the age of the corresponding mother of the child in the family. In 1-mother family, I can complete this task, but with families that have from 2 mothers and above, I don’t know how to create it.
I very appreciate if someone can help me figure it out.
household pernum momloc age child_age mom_age
1 1 0 41
1 2 0 42
1 3 1 17 17
1 4 1 15 15
2 1 0 35
2 2 0 24
3 1 0 37
3 2 0 32
3 3 2 10 10
4 1 0 67
4 2 0 69
4 3 1 44 44
4 4 1 35 35
4 5 0 41
4 6 5 16 16
4 7 5 9 9