Skip to content

Conversation

@Gero1999
Copy link
Collaborator

Issue

Closes #896

Description

This pull request updates the logic for determining which pharmacokinetic parameters should be imputed in the apply_imputation function. 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:

  • Expanded the set of parameters (params_hl_dep) to include those related to lambda.z and half.life in addition to auc and aumc, both in the parameter name and dependencies, to more accurately identify parameters that should not be imputed.
  • Updated the filtering logic for params_not_to_impute to use the new params_hl_dep set, ensuring that any parameter depending on AUC, AUMC, lambda.z, or half-life is excluded from imputation.

Definition of Done

  • If rules are not selected, they should not be applied to the NCA calculation.

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

  • Code passes lintr checks
  • Code passes all unit tests
  • New logic covered by unit tests
  • New logic is documented
  • App or package changes are reflected in NEWS
  • Package version is incremented

Notes to reviewer

Anything that the reviewer should know before tacking the pull request?

@Gero1999 Gero1999 linked an issue Jan 19, 2026 that may be closed by this pull request
@js3110 js3110 requested a review from Shaakon35 January 20, 2026 09:17
@js3110
Copy link
Collaborator

js3110 commented Jan 20, 2026

@Gero1999 as discussed in person, the original issue/how to test seems to be different in main now, so this issue may need redefining. Could you take a look and also add a how to test for the PR? thanks!

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

Successfully merging this pull request may close these issues.

Bug: FLAG column not correct in edge cases

4 participants