I have a long form of clincal data that looks something like this:
\'\'\'patientid <- c(100,100,100,101,101,101,102,102,102,104,104,104) outcome <- c(1,