Skip to content

fix: forward per-run options into sparse AUC and AUMC calculations - #587

Open
billdenney wants to merge 1 commit into
mainfrom
579-sparse-auc-options
Open

fix: forward per-run options into sparse AUC and AUMC calculations#587
billdenney wants to merge 1 commit into
mainfrom
579-sparse-auc-options

Conversation

@billdenney

Copy link
Copy Markdown
Member

Fixes #579.

pk.calc.sparse_auc() accepted options but dropped it, so per-PKNCAdata options = list(conc.blq = ...) had no effect on sparse AUC while the global option did. The options now forward into the mean-profile integration; pk.calc.sparse_aumc() had the identical defect and gets the identical fix. The pk.nca() wiring already mapped options correctly, so the per-run route now works end-to-end. Also corrects the sparse_mean() help to the actual strictly-more-than-50% BLQ zeroing rule (code unchanged).

Verification: results under default options are unchanged (all pre-existing exact-value expectations pass unmodified); new exact-value tests cover the per-run route, the global route (now agreeing), sparse AUMC, and the exactly-50% boundary — 58 pass in the sparse file, 637 in adjacent files.

🤖 Generated with Claude Code

pk.calc.sparse_auc() and pk.calc.sparse_aumc() accepted an options
argument but did not pass it to the mean-profile integration
(pk.calc.auc()/pk.calc.aumc()), so per-PKNCAdata options such as
conc.blq had no effect on sparse parameters while global
PKNCA.options() settings did (issue 579).  The pk.nca() interval
machinery already delivers the merged options to the sparse parameter
functions via their options formal, so forwarding the argument inside
sparse.R completes the chain.

Also correct the sparse_mean() documentation: a timepoint mean is
zeroed when strictly more than 50% of the measurements are BLQ,
matching the code; exactly 50% BLQ is not zeroed.  The zeroing rule
itself is unchanged, and results under default options are unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

Sparse AUC ignores per-PKNCAdata options; global conc.blq default silently drops >50%-BLQ zeroed timepoints from the mean profile

1 participant