My data set has 8 time points, and includes households with multiple children (singletons, twins, or 2-3 siblings). Households are identified by hhid, children are identified by childid. Age is identified by ageinmonths. I would like to create a variable that identifies each child as either a singleton, twin, or sibling. For siblings, I would like to identify which one is older and which one is younger (and how to identify, oldest, middle, and youngest in the case of three). I believe this can be done by tagging hhid's that have multiple childid's assigned, and then sorting to generate a variable for older/younger, but am not sure how to do this exactly.
Also, if I generate a new binary variable, for example "eligible" , and classify each childid as eligible or not, how do I count the unique childid's that are eligible? For example it might say 737 observations are eligible but many of these will be the same childid over multiple time points.
Also, if I generate a new binary variable, for example "eligible" , and classify each childid as eligible or not, how do I count the unique childid's that are eligible? For example it might say 737 observations are eligible but many of these will be the same childid over multiple time points.
Comment