fix: forward per-run options into sparse AUC and AUMC calculations - #587
Open
billdenney wants to merge 1 commit into
Open
fix: forward per-run options into sparse AUC and AUMC calculations#587billdenney wants to merge 1 commit into
billdenney wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #579.
pk.calc.sparse_auc()acceptedoptionsbut dropped it, so per-PKNCAdataoptions = 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. Thepk.nca()wiring already mappedoptionscorrectly, so the per-run route now works end-to-end. Also corrects thesparse_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