Dear all,
I am looking for a correct way to identify the maximum value of a series of variables (values going from 0 to 10) and number of associated duplicates.
The dataset is as follows:
ID Var1 Var2 Var3 ...
1 0 5 10
2 1 10 10
3 10 2 10
4 0 0 0
...
While using egen Pref_Max=rowmax(Var1... Var10), I am not able to correctly identify the number of duplicates of max values (whatever the highest value). I have tested with the "anycount" command but it does not correct the problem.
Thanks a lot for your help if you have already tried to figure out such a problem.
Best,
Martial
I am looking for a correct way to identify the maximum value of a series of variables (values going from 0 to 10) and number of associated duplicates.
The dataset is as follows:
ID Var1 Var2 Var3 ...
1 0 5 10
2 1 10 10
3 10 2 10
4 0 0 0
...
While using egen Pref_Max=rowmax(Var1... Var10), I am not able to correctly identify the number of duplicates of max values (whatever the highest value). I have tested with the "anycount" command but it does not correct the problem.
Thanks a lot for your help if you have already tried to figure out such a problem.
Best,
Martial
Comment