OHDSI / OhdsiShinyModules

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

For meta/Bayesian analyses, "Outcomes while exposed" column displays negative values below -5 (Estimation - Results - SCCS Table - Power Tab) #318

Open conovermitch opened 1 month ago

conovermitch commented 1 month ago

In the Strategus web application showing Estimation results, I tried to pull up the granular results for a summary (meta/Bayesian) analysis for the SCCS design. Within the Power Tab, I was hoping to look at the sum of outcomes that were observed across the different databases. However, the "Outcomes while exposed" column displays negative values below -5 (Estimation - Results - SCCS Table - Power Tab). I'm not sure what the cause is but I'm wondering if the error is arising from cases where some of the databases have "-5" values, indicating the outcome count is below limits of display for our DUAs.

I was not able to confirm if this was the case for the Comparative Cohort module as well since the detailed results for Bayesian analyses appear to generate an error when you try to pull them up in the application.

Please reach out to me at mconove1@its.jnj.com if you want more information about the specific example I'm seeing.

Note: The application I'm using deploys OhdsiShinyModules v2.1.5.9000 and ShinyAppBuilder v2.0.1.9000

conovermitch commented 4 weeks ago

I will leave up the post above since perhaps it highlights that the current results display is not immediately intuitive. However, I looked deeper into this and realize now that things are functioning as they are supposed to. The current negative values below -5 that are displayed refer to the upper end of the range of potential outcomes. So, if multiple databases have fewer than 5 outcomes, each one of those databases may have between one and five outcomes. The number displayed refers to the sum of outcomes across databases if all "-5" databases have 5 outcomes.

Not urgent to address now that I understand the app is functioning correctly, I think it would be more intuitive if we could display a "<" symbol instead of a "-" symbol.

nhall6 commented 4 weeks ago

@conovermitch I believe the logic behind using "-5" instead of "<5" is 2 fold:

1) it allows us to keep the column as numeric type, which allows proper sorting 2) including a symbol such as "<" does not function well within the interactive data frame

@jreps please chime in if I am missing anything. It may be possible to keep the underlying value as the negative value but display the "<" symbol only to the user, but I am not sure.

jreps commented 4 weeks ago

you can use reactable to conditionally format and add the < when the number is negative if the display is a table

conovermitch commented 4 weeks ago

Honestly not pressuring any change here. It was not super intuitive to me which led me to post the issue but now that I understand it I realize the whole thing is working fine. The only reason I didn't close this issue was so it could serve as an enduring monument to my ignorance. But seriously - if there's any easy fix to make it more intuitive I think it would be worth it but probably not worth spending much energy on it.

nhall6 commented 4 weeks ago

you can use reactable to conditionally format and add the < when the number is negative if the display is a table

is this table-wide, or can you make it column-specific (i.e. in a colDef)? It makes sense, but we probably wouldnt want to do it if its table-wide only, because if there are true negative values in other columns, we wouldnt want them to incorrectly change to displaying a "<".