Hello
I would be very grateful for advice on how to generate two variables:
1. Siblings from the same mother. The mother may have had a multiple birth and other births at a different time.
2. Identify if a child was a multiple.
I have the following variables:
MotherID & BabyID. Mother 1 has 4 babies from 2 births.
Baby e is a singleton and has no siblings.
Baby f is a twin but there is no information for the sibling
I have the birth month and birth year to identify if a multiple birth took place. There are multiple records for some babies as each record is a hospital admission.
Totalfetus is the number of fetuses delivered for a particular birth.
I would like to generate a sibling and same birth variable as shown below.
Here is an example of data.
Many thanks!
I would be very grateful for advice on how to generate two variables:
1. Siblings from the same mother. The mother may have had a multiple birth and other births at a different time.
2. Identify if a child was a multiple.
I have the following variables:
MotherID & BabyID. Mother 1 has 4 babies from 2 births.
Baby e is a singleton and has no siblings.
Baby f is a twin but there is no information for the sibling
I have the birth month and birth year to identify if a multiple birth took place. There are multiple records for some babies as each record is a hospital admission.
Totalfetus is the number of fetuses delivered for a particular birth.
I would like to generate a sibling and same birth variable as shown below.
Here is an example of data.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input byte motherid str1 babyid byte birthmonth int birthyear byte(totalfetus hassibling samebirth) 1 "a" 1 2000 1 1 0 1 "b" 2 2002 3 1 1 1 "b" 2 2002 3 1 1 1 "c" 2 2002 3 1 1 1 "d" 2 2002 3 1 1 1 "d" 2 2002 3 1 1 1 "d" 2 2002 3 1 1 2 "e" 3 1999 1 0 . 3 "f" 11 2005 2 1 0 3 "g" 6 2007 2 1 1 3 "h" 6 2007 2 1 1 end
Comment