where id is a unique id for each indiviidual and p_id#'s the id of the
parent (in the real data I have more than 3 pid variables)
I want to create a family id in the most efficient way. My solution to
this problem involves looping over observations, and because of that
it takes a long time. That wouldn't be a problem if my data contained
only a few observations, but that is not the case.
Can anybody suggest more efficient ways to do this task? I was
wondering also, how about using MATA?