Hi, I have a dataset sorted by patients; e.g. 2 observations/lines (of data) for patient 1, 4 lines for patient 2 and so on. I have a variable (we call it "LINES") counting the lines for each patient (1, 2, 3, 4 and so on). I need to create a new variable with data from the the last line for each patient, in other words the highest value of the variable "LINES" (sorted by patients). How do I create a syntax with "highest value" (it should bed sorted by patients already) of a variable? /Mette
... View more