Below is my data in column SUBJ, B and VALUE. I need MINIM column with the min(VALUE) compared to previous observations for same subject. Can Any one help? SUBJ SEQ VALUE MINIM This is how MIN value is calculated
1004 1 35.58 - - There is no obs previous and should appear blank
1004 2 32.69 35.58 - Only one obs available prior so 35.58 is min
1004 3 26.15 32.69 - Compared to obs 1, 2 value of 32.69 is min
1004 4 21.77 26.15 - Compared to obs 1, 2 and 3 value of 26.15 is min
1004 5 19.47 21.77 - Compared to 1, 2,3 and 4 value of 21.77 is min
1004 6 19.52 19.47 - Compared to 1, 2,3,4 and 5 value of 19.47 is min
1004 7 13.71 19.47 - Compared to 1, 2,3,4,5 and 6 for this subject value of 19.47 is min
1004 8 13.7 13.71
1004 9 13.97 13.7
1004 10 24.28 13.7
1005 1 22.57 - - There is no previous obs for this subject and should appear blank
1005 2 10.21 22.57 - Only one row available previous so 22.57 is min
1005 3 10.35 10.21 - Compared to 1, 2 value of 10.21 is min
1005 4 10.35 10.21 - Compared to 1, 2 and 3 value of 10.21 is min
1005 5 10.35 10.21 - Compared to 1, 2,3 and 4 for this subject value of 21.77 is minimum
1005 6 9.76 10.21
... View more