opensafely / post-covid-vaccinated

Post-COVID infection events in the era of delta among the fully vaccinated and the electively unvaccinated​
MIT License
4 stars 1 forks source link

stage 1 data comments #78

Closed yinghuiwei closed 2 years ago

yinghuiwei commented 2 years ago

survival_data = survival_data %>% filter(follow_up_period >0 & follow_up_period < 197) # filter out follow up period

RochelleKnight commented 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

yinghuiwei commented 2 years ago

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.

RochelleKnight commented 2 years ago

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

yinghuiwei commented 2 years ago

I have now rebased, and I now see the vax_date_eligible="2100-12-31" disappears, but now there are negative follow-up periods.

yinghuiwei commented 2 years ago

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

yinghuiwei commented 2 years ago

constraints added for the dummy data.