OHDSI / OhdsiShinyModules

An R package containing Shiny modules used by various OHDSI Shiny apps
https://ohdsi.github.io/OhdsiShinyModules/
8 stars 11 forks source link

Report stored MDRR in power tab, not re-computed one #348

Open schuemie opened 1 month ago

schuemie commented 1 month ago

In the CohortMethod power tab, the MDRR is shown. This is computed on the fly based on the counts. However, the problem with this is that the counts might be masked because they were below the minCellCount. The current code simply takes the absolute value of the count, meaning in the case of masking it assumes the value of minCellCount: https://github.com/OHDSI/OhdsiShinyModules/blob/main/R/estimation-cohort-method-power.R#L354

This can lead to different MDRR numbers between the Diagnostics tab and the power tab.

Could we just pull the pre-computed MDRR from the cm_diagnostics_summary table instead?

schuemie commented 1 month ago

Note that the current calculations in OhdsiShinyModels always assumes we are using a Cox model, which isn't necessarily true