Hello all,
Using household survey data I am trying to match the child's age with the mother's characteristics where the mother's age and her children's ages are contained in one variable 'age'.
Key information to consider is that in one household, there can be more than one child to a mother and in some cases, there are more than one mother (and her children) in a household (these are households with multiple families).
There is a household id used to identify members of a household and a unique person id for each individual in the household. Each individual also has a variable which can be used to identify whether their mother is resident in the household.
I have tried to create separate datasets where one contains information on mothers and the second contains information on children and then merging this by creating the same unique identifier for the mother and child however the mother's characteristics replicates depending on the number of children she has (this incorrectly increases the sample size). This method also does not account for having more than one mother in a household and requires that all individuals except for mothers and children be removed from the dataset.
Essentially, I want to calculate the mother's age at birth by subtracting her child's age from her age.
Is there another method which I have overlooked?
clear
HHID PID UNQR AGE Gender motherinhh PIDofmother Childage1 Childage2
001 01 00101 45 M N
001 02 00102 43 F N 12
001 03 00103 12 F Y 02
002 01 00201 39 F N 15 09
002 02 00202 34 M N
002 03 00203 15 M Y 01
002 04 00204 09 M Y 01
003 01 00301 75 F N 45
003 02 00302 45 F Y 01 19 10
003 03 00303 19 M Y 02
003 04 00304 10 F N 02
003 05 00305 38 F Y 09 06
003 06 00306 09 M Y 05
003 07 00307 06 M Y 05
end
Using household survey data I am trying to match the child's age with the mother's characteristics where the mother's age and her children's ages are contained in one variable 'age'.
Key information to consider is that in one household, there can be more than one child to a mother and in some cases, there are more than one mother (and her children) in a household (these are households with multiple families).
There is a household id used to identify members of a household and a unique person id for each individual in the household. Each individual also has a variable which can be used to identify whether their mother is resident in the household.
I have tried to create separate datasets where one contains information on mothers and the second contains information on children and then merging this by creating the same unique identifier for the mother and child however the mother's characteristics replicates depending on the number of children she has (this incorrectly increases the sample size). This method also does not account for having more than one mother in a household and requires that all individuals except for mothers and children be removed from the dataset.
Essentially, I want to calculate the mother's age at birth by subtracting her child's age from her age.
Is there another method which I have overlooked?
clear
HHID PID UNQR AGE Gender motherinhh PIDofmother Childage1 Childage2
001 01 00101 45 M N
001 02 00102 43 F N 12
001 03 00103 12 F Y 02
002 01 00201 39 F N 15 09
002 02 00202 34 M N
002 03 00203 15 M Y 01
002 04 00204 09 M Y 01
003 01 00301 75 F N 45
003 02 00302 45 F Y 01 19 10
003 03 00303 19 M Y 02
003 04 00304 10 F N 02
003 05 00305 38 F Y 09 06
003 06 00306 09 M Y 05
003 07 00307 06 M Y 05
end