I have a large secondary data frame with survival observation data (multiple entries for each subject ID). I'm trying to figure out which subjects had their last observation data recorded before the end of the study observation period (eg. before week 100 in the case of this study). Essentially, I'm trying to find out who was lost to follow up. Is there a function that does this? I'm sorry if a similar question has already been answered, but I couldn't think of technically specific enough terms to find anything in a web search. I have a basic literacy in R but I don't have a really strong technical background. Thank you for your time and help!
In the excerpt from the data frame in question below. There is one instance in which the last observation is less than 105 weeks (104).
structure(list(ID = c(140L, 140L, 141L, 142L, 142L, 143L, 143L,
144L, 144L, 144L, 144L), WEEK = c(40L, 105L, 105L, 11L, 105L,
103L, 104L, 37L, 48L, 65L, 105L), OBSDATE = structure(c(40L,
107L, 107L, 11L, 107L, 105L, 106L, 37L, 48L, 65L, 107L), .Label = c("2002-12-29",
"2003-01-05", "2003-01-12", "2003-01-19", "2003-01-26", "2003-02-02",
"2003-02-09", "2003-02-16", "2003-02-23", "2003-03-02", "2003-03-09",
"2003-03-16", "2003-03-23", "2003-03-30", "2003-04-06", "2003-04-13",
"2003-04-20", "2003-04-27", "2003-05-04", "2003-05-11", "2003-05-18",
"2003-05-25", "2003-06-01", "2003-06-08", "2003-06-15", "2003-06-22",
"2003-06-29", "2003-07-06", "2003-07-13", "2003-07-20", "2003-07-27",
"2003-08-03", "2003-08-10", "2003-08-17", "2003-08-24", "2003-08-31",
"2003-09-07", "2003-09-14", "2003-09-21", "2003-09-28", "2003-10-05",
"2003-10-12", "2003-10-19", "2003-10-26", "2003-11-02", "2003-11-09",
"2003-11-16", "2003-11-23", "2003-11-30", "2003-12-07", "2003-12-14",
"2003-12-21", "2003-12-28", "2004-01-04", "2004-01-11", "2004-01-18",
"2004-01-25", "2004-02-01", "2004-02-08", "2004-02-15", "2004-02-22",
"2004-02-29", "2004-03-07", "2004-03-14", "2004-03-21", "2004-03-27",
"2004-03-28", "2004-04-04", "2004-04-11", "2004-04-18", "2004-04-25",
"2004-05-02", "2004-05-09", "2004-05-16", "2004-05-23", "2004-05-30",
"2004-06-06", "2004-06-10", "2004-06-13", "2004-06-20", "2004-06-27",
"2004-07-04", "2004-07-11", "2004-07-18", "2004-07-25", "2004-08-01",
"2004-08-08", "2004-08-15", "2004-08-22", "2004-08-29", "2004-09-05",
"2004-09-12", "2004-09-19", "2004-09-26", "2004-10-03", "2004-10-10",
"2004-10-17", "2004-10-24", "2004-10-31", "2004-11-07", "2004-11-14",
"2004-11-21", "2004-11-28", "2004-12-05", "2004-12-12", "2004-12-19",
"2004-12-26", "2005-11-24", "2006-11-02", "2007-02-26", "2009-05-18",
"2010-08-11", "2011-01-29", "2013-09-06", "2017-04-23", "2017-05-13",
"2019-05-01", "2022-11-22", "2026-03-20", "2026-08-15", "2028-09-26",
"2030-02-08", "2034-08-30", "2035-01-22", "2035-10-14", "2037-09-20",
"2038-05-09", "2043-01-31", "2043-08-19", "2045-03-29", "2046-05-15",
"2050-03-06", "2053-10-15", "2054-05-22", "2056-06-09", "2060-03-13",
"2061-04-15", "2061-08-30", "2062-07-10"), class = "factor")), .Names = c("ID",
"WEEK", "OBSDATE"), row.names = 231:241, class = "data.frame")