Closed ericaVoss closed 2 years ago
I'm not sure the reason why sometimes the data is missing subgroups - I just ask for a rerun.
The R function createCohortsAndRef
seems to be the root cause of the problem here. Just documenting my findings for reference:
When calling createCohortsAndRef
, the reference tables are created here. Later in the function, the subgroups are created here. Unlike the target/outcome cohorts, the SQL for creating the subgroups does 2 operations: it creates the reference table and then builds the subgrouped cohorts.
In the situation when you run createCohortsAndRef
multiple times in incremental mode, the first time will create the subgroup_ref_table
properly. Subsequent runs will wipe out the subgroup_ref_table
and since the SQL for the subgroup construction has run already, the processing will skip it thus leaving the subgroup_ref_table
table empty. Then later when the IR analysis runs, it attempts to create the combinations of target, subgroup, outcome and TAR cross-reference table by selecing from all of the reference tables, including the subgroup_ref_table
here
I believe V1.2.7 should fix this issue, but I want to make sure before I close the ticket.
I would just run from a clean folder and rerun the whole thing.
Make sure the the version of the package you get is V1.2.7.
I sometimes run these first just to double make sure the old package is gone:
#renv::deactivate()
#remove.packages("Covid19SubjectsAesiIncidenceRate")
#renv::purge("Covid19SubjectsAesiIncidenceRate")
Related to https://github.com/ohdsi-studies/Covid19SubjectsAesiIncidenceRate/issues/28
Some of the IR reports run are missing subgroups in the run. Sent instructions via email asking for rerun.