Hi everyone,
Please consider the following data
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str8 childid float(round hi)
"IN010001" 2 .
"IN010001" 3 1
"IN010001" 4 1
"IN010001" 5 1
"IN010002" 2 .
"IN010002" 3 1
"IN010002" 4 1
"IN010002" 5 0
"IN010003" 2 .
"IN010003" 3 1
"IN010003" 4 1
"IN010003" 5 1
"IN010004" 2 .
"IN010004" 3 1
"IN010004" 4 1
"IN010004" 5 1
"IN010005" 2 .
"IN010005" 3 0
"IN010005" 4 1
"IN010005" 5 1
"IN010006" 2 .
"IN010006" 3 0
"IN010007" 2 .
"IN010007" 3 0
"IN010007" 4 0
"IN010007" 5 0
"IN010008" 2 .
"IN010008" 3 1
"IN010008" 4 0
"IN010008" 5 0
"IN010009" 2 .
"IN010009" 3 1
"IN010009" 4 1
"IN010009" 5 1
"IN010010" 2 .
"IN010010" 3 1
"IN010010" 4 1
"IN010010" 5 1
"IN010011" 2 .
"IN010011" 3 1
"IN010011" 4 0
"IN010011" 5 1
"IN010012" 2 .
"IN010012" 3 1
"IN010012" 4 1
"IN010012" 5 1
"IN010013" 2 .
"IN010013" 3 1
"IN010013" 4 1
"IN010013" 5 1
"IN010014" 2 .
"IN010014" 3 1
"IN010014" 4 1
"IN010014" 5 1
"IN010015" 2 .
"IN010015" 3 0
"IN010015" 4 1
"IN010015" 5 1
"IN010016" 2 .
"IN010016" 3 0
"IN010016" 4 1
"IN010016" 5 1
"IN010017" 2 .
"IN010017" 3 1
"IN010017" 4 1
"IN010017" 5 1
"IN010018" 2 .
"IN010018" 3 1
"IN010018" 4 1
"IN010018" 5 1
"IN010019" 2 .
"IN010019" 3 1
"IN010019" 4 1
"IN010019" 5 1
"IN010020" 2 .
"IN010020" 3 1
"IN010020" 4 1
"IN010020" 5 0
"IN010021" 2 .
"IN010021" 3 1
"IN010021" 4 1
"IN010021" 5 1
"IN010023" 2 .
"IN010023" 3 1
"IN010023" 4 1
"IN010023" 5 1
"IN010024" 2 .
"IN010024" 3 1
"IN010024" 4 1
"IN010024" 5 1
"IN010025" 2 .
"IN010025" 3 0
"IN010025" 4 0
"IN010025" 5 0
"IN010026" 2 .
"IN010026" 3 1
"IN010026" 4 1
"IN010026" 5 1
"IN010027" 2 .
"IN010027" 3 0
end
The characteristic mentioned in the question is the variable hi which is a binary variable. The variable hi is relevant for rounds 3,4 and 5 and not for round 2, as can be seen from the data. Now I want to flag only those childid s for which
Code:
hi==1
for a round but
Code:
hi==0
for any of the subsequent rounds. This would help my identify those individuals who have quit hi after opting for it so that I may study those individuals in depth.
Any guidance in this regard would be greatly appreciated.

Thanks and regards,
Titir