I want to count the number of different values ignoring missing by pid.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long pid byte age float seqage 201 45 2 201 46 2 201 47 2 201 48 2 201 49 2 201 50 3 201 51 . 201 52 4 201 53 4 201 54 4 201 55 4 1101 45 5 1101 46 5 1101 47 5 1101 48 5 1101 49 5 1101 50 5 1101 51 5 1101 52 5 1101 53 5 1101 54 5 1101 55 5 end
In case of pid 201, the number of different values (2, 3, 4) is three.
In case of pid 1101, the number of different values (5) is one.
Thank you very much for your help.
Halim.
0 Response to Count the number of different values (ignoring missing)
Post a Comment