Greetings,

I have a longitudinal administrative health dataset consisting of over 400,000 observations. Patients are represented by an alpha numeric identification number and have between 1 and 7000+ administrative claims. I would like to identify all patient identification numbers that received the same treatment across all observations. I have generated a variable that identifies the treatment of interest as 1 for each observation, but I have not been able to figure out how to identify Patients who received the treatment across all observation.

Here is an example dataset to help illustrate my problem:

ID TRT

a1 1

a1 0

a1 1

a2 1

a3 1

a3 1

a4 1

a4 1

a4 1

a5 0

a5 0

In the example provided ID# a2-a4 received the same treatment.

Thanks in advance.

Robert