Hello everyone,

I think this is quite a simple question but I am still not very used to STAT

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input int pid byte(age_45 age_46 age_47 age_48 age_49 age_50)
101 1 2 . . 4 .
102 2 2 3 3 5 4
103 . . . . . .
104 . . 1 1 1 1
105 2 5 5 5 4 .
end
This is my data format. Every individuals occupies one line (i.e. wide format) and from age_45 to age_50 refers to one's employment status at each year.
I want to drop pid who has more than 3 missings.

I think I should use 'egen' but not sure

Thank you for your help!


Halim.