fix: HL parameters being NA for no reason & flags with no rules (#896) #904
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
Closes #896
Description
This pull request updates the logic for determining which pharmacokinetic parameters should be imputed in the
apply_imputationfunction. The main change is to expand the set of parameters considered dependent on half-life or lambda.z, ensuring that imputation is skipped for parameters that depend on these as well as AUC/AUMC.Imputation logic improvements:
params_hl_dep) to include those related tolambda.zandhalf.lifein addition toaucandaumc, both in the parameter name and dependencies, to more accurately identify parameters that should not be imputed.params_not_to_imputeto use the newparams_hl_depset, ensuring that any parameter depending on AUC, AUMC, lambda.z, or half-life is excluded from imputation.Definition of Done
How to test
In dummy data, add manual selection to Subj 1, Range 6:7. Run NCA and view that row is "MISSING" this is expected. Then deselect all rule sets and rerun, row is still "MISSING".
Contributor checklist
Notes to reviewer
Anything that the reviewer should know before tacking the pull request?