When answering a research question, the best study design is determined by the information a solution requires and a product of the available data and methods. In a clinical setting, research question typically necessitate clinical assessments performed at pre-defined, discrete time intervals during the course of a trial. The resulting data makes it possible for researchers to estimate the time during which a condition, or event of interest, is observable. For example, when longitudinal data is collected at discontinuous, but successive time points, it is sometimes possible to approximate the length of time one can observe an indication. In other times, the prospect of estimating the persistence of an event may be out of the question.

Event records of a similar class may not be proportionately successive due to missing data. For example, what information is needed to determine if a rash affecting a patient’s torso originated on that patient’s neck two weeks ago, when data was available last? Perhaps knowledge of the infection’s distributional characteristics can help clinical analysts decide whether the records truly represents two infections that are independent of each other or one infection that simply spread across the patient’s body at an acceptable rate.

Situations where it is desirable to collapse longitudinal event records and impute new endpoints are not limited to the case of missing data. Certain analyses may require programmers to collapse a category of observations together and estimate the time spanned across those observations. Consider the research questions: How many indistinguishable, one-syllable words does a baby girl pronounce before it is able to pronounce a two-syllable word? When does she begin to tackle additional syllables? How do these estimates compare to those of baby boys?

This paper introduces a fictional scenario that warrants the discussion of a programmatic solution to merging related observations by virtue of both class and relative proximity. The computational process is presented in the SAS language and validated in Base SAS 9.0 through 9.3.