Hi,
I have the following dataset and I would like to find which individuals are siblings and find the birth order of each individual. How can I do that?
----------------------- copy starting from the next line -----------------------
------------------ copy up to and including the previous line ------------------
I have the following dataset and I would like to find which individuals are siblings and find the birth order of each individual. How can I do that?
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(id parents_id birth_year year expense) 1 1 2001 2020 348.8717 1 1 2001 2019 266.8857 1 1 2001 2018 136.6463 1 1 2001 2021 28.556866 1 1 2001 2022 868.9333 1 1 2001 2023 350.8549 1 1 2001 2024 71.105095 1 1 2001 2016 323.36795 2 5 2009 2009 555.1032 2 5 2009 2010 875.991 2 5 2009 2011 204.70947 2 5 2009 2012 892.7587 3 1 1998 2003 584.4658 3 1 1998 2001 369.7791 3 1 1998 2004 850.6309 4 7 2003 2009 391.3819 4 7 2003 2010 119.66132 4 7 2003 2011 754.2434 4 7 2003 2012 695.0234 5 5 2007 2011 686.6152 5 5 2007 2013 931.9346 5 5 2007 2015 454.8882 end

Comment