Analyzing longitudinal data to characterize the accuracy of markers used to select treatment