Selects the best-matching purity and scale factor (dicovsf) from a grid of models, based on user input (value or range), and returns the optimal combination for downstream analysis.
Arguments
- purity
Numeric, character, or NULL. Desired purity value, or a range in the format
"min:max"(e.g.,"0.5:0.7"). IfNULL, all available purity values inmodelsare considered.- dicovsf
Numeric, character, or NULL. Desired scale factor (mu), or a range in the format
"min:max"(e.g.,"0.9:1.1"). IfNULL, all available scale factor values inmodelsare considered.- models
Data frame or tibble. Model grid with columns
rho(purity),mu(scale factor),total_distance_to_integer, andtotal_log_likelihoodgenerated by initial run.
Value
A named list with elements:
- final_purity
Selected purity value.
- final_sf
Selected scale factor (mu) value.
