I have a data set of siblings and I am currently trying to create a birth order variable where 1 is oldest sibling, 2 is second oldest sibling, 3 is third oldest sibling.... Is there a simple way to do this while the data is still in long format using the age, family id, and id variables I have. I am struggling to think of what the code would be but essentially want to group the id's that share the same famid and then create the birth order variable using their age.
-
Login or Register
- Log in with
Comment