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

Throw warnings for some input variable ranges #3

Open
fredjaya opened this issue Nov 2, 2023 · 4 comments
Open

Throw warnings for some input variable ranges #3

fredjaya opened this issue Nov 2, 2023 · 4 comments
Assignees
Milestone

Comments

@fredjaya
Copy link
Collaborator

fredjaya commented Nov 2, 2023

Such as:

  • sensitivity < 0.5
  • specificity < 0.5
  • $(1-specificity) \geq prevalence$
  • correlation = 0 (in effect random sampling)
  • correlation = 1

Will need to decide whether these should be in functions, depending on re-usability and need across functions.

@AngusMcLure
Copy link
Owner

Yes, most of the these should be warnings in most functions. Note that because we have functions calling functions and passing on some of these parameters, you might want to put the warning at just the first called function (or the last called function) to avoid getting the same warning twice (or more) for each function call. E.g. optimise_sN_prevalence works by calling optimise_s_prevalence repeatedly (and will use the same sensitivity, specificity, prevalence, and correlation across all these calls). So we'll need to think a bit carefully about where we put the warning

@AngusMcLure AngusMcLure assigned fredjaya and unassigned AngusMcLure Nov 2, 2023
@fredjaya
Copy link
Collaborator Author

fredjaya commented Nov 6, 2023

Adhere to the tidyverse style guide for error messages

@AngusMcLure
Copy link
Owner

Yes, this would be good. I hadn't read these before!

@fredjaya fredjaya added this to the v0.0.2 milestone Nov 23, 2023
@fredjaya fredjaya removed this from the v0.0.2 milestone Dec 5, 2023
@fredjaya
Copy link
Collaborator Author

fredjaya commented Dec 5, 2023

Refer to #27 for typical values

@fredjaya fredjaya added this to the v0.1.2 milestone Dec 8, 2023
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

2 participants