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?


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)){
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

1 Answer 1


This is mainly a function of how you define time = 0 for the models. If you set time = 0 to be the study-entry time for each individual, then for event outcomes you would have right censoring in elapsed time, as is common in survival models. There is no "delayed entry" for any individual, just the inherent limitation of potential right censoring. To account for things like secular changes during the course of the study, you can include the study entry date as a covariate for each individual and model that smoothly, e.g. with regression splines.

For continuous outcomes like weight gain over time you could, for example, use a random-effects model. Then there is no need for all individuals to have the same number of observations or even to have them spaced evenly. Those with more observations end up being weighted more heavily, and will be the only ones to provide information about the longest times after the individually set time = 0 as defined in the first paragraph.

  • $\begingroup$ +1 For this, which I think answers the original question nicely. In case this is not what @stats_noob is asking, I would suggest they take a look at immortal time bias in Rothman, K. J., & Greenland, S. (1998). Modern Epidemiology (2nd ed.). Lippincott-Raven, pp 106–107. $\endgroup$
    – Alexis
    Commented Jun 1, 2022 at 4:48
  • $\begingroup$ @EdM : Thank you for your answer! If you have time, could you please write a bit more? I am still not sure if I fully understand your answer. Thank you! $\endgroup$
    – stats_noob
    Commented Jun 5, 2022 at 3:20
  • $\begingroup$ I have a feeling it might just be easier to select a group of patients that all entered the study at the same date and then record what happens to them over a period of time...instead of allowing patients to enter the study at different dates? $\endgroup$
    – stats_noob
    Commented Jun 5, 2022 at 5:17
  • $\begingroup$ @stats_noob your suggestion is typically impractical in practice. How would you do that for a clinical trial of a cancer therapy? You don't get several hundred patients all having the same type of cancer and eligible for the trial and all being diagnosed for the first time on the same date. Specify what isn't clear in the answer as it stands and I'll see if I can expand on those items. $\endgroup$
    – EdM
    Commented Jun 5, 2022 at 17:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.