Hi Stata users,
I am having individual level dataset and would like to use
command to generate the first occurrence per household
Below is an example of the data set
The idea is
to be the first value of
per household.
Thanks in advance!
I am having individual level dataset and would like to use
Code:
egen
Below is an example of the data set
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(hhid ind_id value first) 1 11 2.76 2.76 1 12 1.44 2.76 1 13 1.94 2.76 2 21 3.12 3.12 2 22 1.87 3.12 3 31 2.04 2.04 3 32 3.79 2.04 3 33 1.65 2.04 3 34 2.89 2.04 4 41 1.87 1.87 5 51 2.04 2.04 5 52 1.97 2.04 5 53 1.52 2.04 end
Code:
first
Code:
value
Thanks in advance!

Comment