So I have a dataset with multiple duplicates, and I want to create a dataset that selects for the max value across multiple values. So for example:
ID Value1 Value2 Value3 Gender Race
1 45 76 87 M B
1 34 45 95 M B
2 67 100 92 F W
2 43 70 89 F W
3 34 95 80 F A
3 22 41 90 F A
4 78 25 7 M W
4 32 37 13 M W
5 56 105 25 M B
5 80 59 45 M B
Will become this:
ID Value1 Value2 Value3 Gender Race
1 45 76 95 M B
2 67 100 92 F W
3 34 95 90 F A
4 78 56 13 M W
5 80 105 45 M B
I have a feeling it has to do with the summarize command (although there are 40 value variables, so I fear writing a line of code for each variable) or some of the solutions provided here (which I don't know how to quite to modify for my needs): Remove duplicates keeping entry with largest absolute value