Recently, I thought of the question:
Suppose some researchers are doing a medical study - in this study, patients have their weight measured once each year and are assigned a "health score" ranging from 1 to 5 (1 = worst, 5 = best). Some "static" standard information is also recorded about every patient that enters the study (e.g. race, gender, if they smoke, etc. )
This study started in 2010 and 1,000 patients joined the study in 2010.
In 2011, some new patients joined the study and some of the existing patients left the study (new patients also have their "static" information recorded upon entry)
In 2012, some new patients joined the study and some of the existing patients (i.e. some of the patients who joined in 2010 and some of the patients who joined in 2011) left the study. (new patients also have their "static" information recorded upon entry)
This continues on until the medical study is finished 2021. (new patients also have their "static" information recorded upon entry)
Looking at this setup, we can see that there will exist some patients that were measured at all times during this study (i.e. 11 times) and some patients that were not measured at all times during this study (i.e. less than 11 times). This is especially true for the patients who entered after the study had began - patients who entered after the study had began will necessarily not have been measured 11 times. This is an example of "delayed entry".
If the researchers now want to fit longitudinal models to this data for the purpose of exploring questions such as "do males who smoke become heavier as they age compared to males who don't smoke?" or "do males who don't smoke transition to overall better states of health compared to women don't smoke?" - I think the following problem might likely arise:
If they choose to analyze all patients in the study, some patients might have significantly fewer measurements - although I am not very knowledgeable about this topic, I have a feeling that this might create some type of "delayed entry bias".
But if they choose to analyze only the patients in the study having 11 measurements, they will be likely discarding a significant number of observations and be left with a smaller sample size - it is possible that now instead of the "delayed entry bias", they might have some type of "survivorship bias".
This leads me to my question : In longitudinal medical studies, how are the effects of "delayed entry bias" usually accounted for?
I thought of some naïve solutions in which a new variable can be created that record how many times a patient was measured (e.g. this new variable can be used as a variable in a Cox-PH Regression Model) - but I am not sure how effective this would be (if at all) for taking into account "delayed entry bias" on the Hazard Ratios and Beta Coefficients of the Cox-PH Regression Model.
Can someone please comment on this?
Thanks!
Additional Material: R Simulation
Using the R programming language, I created a dataset to simulate such a medical study with delayed entry:
id = 1:100
weight_time_1 = rnorm(100,100,10)
weight_time_2 = rnorm(100,100,10)
weight_time_3 = rnorm(100,100,10)
weight_time_4 = rnorm(100,100,10)
weight_time_5 = rnorm(100,100,10)
weight_time_6 = rnorm(100,100,10)
weight_time_7 = rnorm(100,100,10)
weight_time_8 = rnorm(100,100,10)
weight_time_9 = rnorm(100,100,10)
weight_time_10 = rnorm(100,100,10)
state_time_1 = sample.int(5, 100, replace = TRUE)
state_time_2 = sample.int(5, 100, replace = TRUE)
state_time_3 = sample.int(5, 100, replace = TRUE)
state_time_4 = sample.int(5, 100, replace = TRUE)
state_time_5 = sample.int(5, 100, replace = TRUE)
state_time_6 = sample.int(5, 100, replace = TRUE)
state_time_7 = sample.int(5, 100, replace = TRUE)
state_time_8 = sample.int(5, 100, replace = TRUE)
state_time_9 = sample.int(5, 100, replace = TRUE)
state_time_10 = sample.int(5, 100, replace = TRUE)
my_data = data.frame(id, weight_time_1, state_time_1, weight_time_2, state_time_2, weight_time_3, state_time_3,
weight_time_4, state_time_4, weight_time_5, state_time_5, weight_time_6, state_time_6, weight_time_7, state_time_7,
weight_time_8, state_time_8, weight_time_9, state_time_9, weight_time_10, state_time_10)
Next, simulate "Delayed Entry Bias" (not all of this is my own code):
id = 1:100
delete_or_not_delete = sample.int(2, 100, replace = TRUE)
deleted_ids = data.frame(id,delete_or_not_delete)
col_delete = c(2,4,6,8,10, 12, 14, 16, 18)
col_delete = sample(col_delete, 100, replace = TRUE)
deleted_ids$col_delete = col_delete
deleted_ids$final_number_of_col_delete = ifelse(deleted_ids$delete_or_not_delete == "1", deleted_ids$col_delete, "NONE")
deleted_ids$col_delete = NULL
deleted_ids$delete_or_not_delete = NULL
for(i in 1:nrow(my_data)){
if(deleted_ids$final_number_of_col_delete[i]!="NONE"){
my_data[i,2:(deleted_ids$final_number_of_col_delete[i])]=NA #2 required to retain ID column but replaces all specified columns with NA
}
else{my_data[i,]=my_data[i,]} #Keeps the other values as they are before adding NAs
}
The data looks something like this:
id weight_time_1 state_time_1 weight_time_2 state_time_2 weight_time_3 state_time_3 weight_time_4 state_time_4 weight_time_5 state_time_5 weight_time_6 state_time_6 weight_time_7 state_time_7
1 1 103.7696 3 102.60722 3 120.2528 5 106.7656 1 97.01015 2 101.26631 2 89.81653 4
2 2 111.8626 3 89.64953 2 125.8865 2 120.6992 2 99.14853 4 80.81064 1 86.25739 5
3 3 NA NA NA NA NA NA NA NA NA NA NA NA NA 1
4 4 NA NA NA NA NA NA NA NA NA NA NA NA NA 2
5 5 NA NA NA NA NA NA NA NA NA NA NA 1 84.05211 1
6 6 103.9553 1 98.43892 3 129.2248 4 100.8912 4 95.26766 3 98.62113 2 90.33478 2
weight_time_8 state_time_8 weight_time_9 state_time_9 weight_time_10 state_time_10
1 106.39808 2 119.30311 3 117.22371 3
2 96.59132 5 106.78205 4 116.53833 4
3 94.67291 5 103.99409 2 101.45564 5
4 87.88849 1 93.72942 2 95.93821 4
5 76.16874 2 99.97160 1 104.16617 2
6 108.67481 4 108.43697 3 91.19394 5