Those with same id numbers are categorized into ranks and I want to keep percentage1 com11 pet1 when rank is 1 and so forth but after the first code Stata drops all rank which is not 1. Can someone please guide me. Thank You
if rank == 1 keep percentage1 com11 pet1
if rank == 2 keep percentage2 com12 pet2
if rank == 3 keep percenatge3 com13 pet3 Array
0 Response to how to keep variable x1,y1,z1 when rank =1 and keep x2,y2,z2 when rank=2 for different ids
Post a Comment