Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSA tornado omits parameters with a negative minimum value #166

Open
ronhandels opened this issue Nov 7, 2023 · 0 comments
Open

DSA tornado omits parameters with a negative minimum value #166

ronhandels opened this issue Nov 7, 2023 · 0 comments

Comments

@ronhandels
Copy link

Dear dampack developers,

I believe the function owsa_tornado in the file 'owsa.R' applies a filter that omits parameters that have negative minimum values from the tornado plot.

I ran a model with high intervention costs and run the function to produce a tornado plot on the model outcome 'net health benefit', which includes negative NHB values. The owsa_tornado function filters parameters that meet a specific relative threshold in order to 'only plots parameters that lead to a relative change in the outcome greater than or equal to min_rel_diff, which must be between 0 and 1'. Code copied here with reference below:

rel_diff = .data$abs_diff / .data$outcome_val.low) %>% filter(.data$rel_diff >= min_rel_diff)

filter(.data$rel_diff >= min_rel_diff) %>%

If .data$outcome_val.low is negative (for example with net health benefit or net monetary benefit), then the rel_diff is negative which will consequently be filtered out as it is lower than the min_rel_diff which can't be set lower than 0. In addition, i believe this function allows to have values higher than 1 (outside the allowed 0-1 range of the min_rel_diff).

I workaround might be to calculate the rel_diff as the (absolute of the difference between high and low) / (highest among all parameters 'absolute of the difference between high and low'). Or alternatively, to take the absolute of the .data$outcome_val.low to allow negative values.

I'm relatively new to github, checked the issues section for duplication of my question and hope I have understood the functionality of the tornado function correctly in combination with its appropriateness for using it for net health benefit outcome. I think for most other outcomes (LY, QALY, cost) my issue is not applicable as they should not contain negative values.

Thanks in advance for considering this issue.
Ron Handels

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant