I have a data file of approximately 5000 repeated measures organized with rows containing IDs and repeated measures on weight, BMI, etc for children. I would like to find the maximum value of one variable (BMI) for each individual (out of up to 9 records). How can I do a lookup on multiple rows for each ID and return the max of a value for each person?
A very abbreviated example is as follows: HAVE:
ID Date BMI
1 1 20
1 2 18
1 3 24
2 4 23
2 5 19
2 6 17
3 7 25
3 8 18
3 9 21
WANT
ID Highest BMI Corresponding date
1 24 3
2 23 4
3 25 7
Alternatively if there is a way to do this in SPSS or JMP (I don't have access to SAS now), please let me know. Thanks! Melissa