Closed fredjaya closed 1 year ago
Yes, this makes sense and will make it more robust with minimal code duplication
All done with full test coverage for the user-facing functions:
optimise_s_prevalence()
optimise_sN_prevalence()
design_effect()
fi_pool_cluster()
Will make a new issue for the upcoming period_sampling ones once merged.
Add checks to ensure input variables are sensible. Required for all end-user functions.
As a lot of input variables are shared across functions, I think it is worth having helper functions for this and placing them in a dedicated util file like
R/util_variable_checks.R
.Ideas:
These should be general and will exclude function-specific ones like checking
pool_size
andpool_number
vectors are the same length.