for bysg datasets need to filter for unique IDs so that start values of cases with multiple gains only get selected once and not as often as that case had a sg/sl.
for byperson need to filter for sg/sl cases only so that not whole sample gets included in calculations for start and end value
for bysg datasets need to filter for unique IDs so that start values of cases with multiple gains only get selected once and not as often as that case had a sg/sl.
for byperson need to filter for sg/sl cases only so that not whole sample gets included in calculations for start and end value