Hello, Everyone. I have household data of
more than 50,000 observations in Stata - like in Picture named 1.


I want to create the
household_index based on the relation variable
Like in Pic named 2.

How I can do this. I want to create the
do file Please