How to assign the maximum value of the other variable to a variable by group?
ID Time Condition Seq Want_temp Want_final_v1 A 1 yes 0 0 0 A 2 yes 0 . 1 A 3 no 1 . . A 4 yes 0 . 2 A 5 no 1 . . A 6 no 2 . . B 1 yes 0 . 4 B 2 no 1 . . B […]
Stata: How to assign the maximum value of the other variable to a variable by group?
ID Time Condition Seq Want_temp Want_final_v1 A 1 yes 0 0 0 A 2 yes 0 . 1 A 3 no 1 . . A 4 yes 0 . 2 A 5 no 1 . . A 6 no 2 . . B 1 yes 0 . 4 B 2 no 1 . . B […]