Closed yinghuiwei closed 2 years ago
Once the main branch has been updated to make sure that indexdate is a date variable, you shouldn't get anyone in the input*_stage1.rds datasets with vax_date_eligible = "2100-12-31" as there is a check in stage 1 that the index_date is within the study start and end dates
I have now rebased the main branch, and negative follow up disappears. I see there are still some entries with vax_date_eligible = "2100-12-31", and their JCV groups are not necessarily 99.
I have just merged the PR that changes index_date back to a date variable so hopefully you shouldn't have any vax_date_eligible="2100-12-31" now if you rebase
I have now rebased, and I now see the vax_date_eligible="2100-12-31" disappears, but now there are negative follow-up periods.
It seems like the issue is still persisting in the dummy data, some 1st vaccination date was before the index date, and there are still negative follow up periods, when figuring out follow up end dates for individuals, some conditions need to put into place in the calculations to ensure that the follow up end date is >= index date
constraints added for the dummy data.
In the data set "input_vaccinated_stage1.rds", there are 7865 patients with vax_date_eligible = "2100-12-31"; the equivalent number is 11216 patients in the electively unvaccinated population
for some patients, the study follow up period is negative, probably due to the way the dummy data is set up. Renin and myself have used the following code to filter out negative follow up period for the delta population
survival_data = survival_data %>% filter(follow_up_period >0 & follow_up_period < 197) # filter out follow up period