docs: Tobit half-life now runs end-to-end through pk.nca() - #4
Open
billdenney wants to merge 1 commit into
Open
Conversation
Upstream humanpred/pknca issue 553 (closed 2026-06-11) added an lloq argument to PKNCAconc() (numeric scalar or column name) and wired it through to pk.calc.half.life(), so hl_method = "tobit" set via PKNCAdata(options = ...) no longer needs the direct pk.calc.half.life() workaround. Verified against the installed PKNCA 0.12.1.9000 (GitHub eff79252, packaged 2026-07-24): the pipeline result matches the direct Tobit call exactly and errors only when lloq is absent from PKNCAconc. - user/halflife.qmd: replace the pipeline-workaround note with a runnable end-to-end example, tagged (>= 0.12.2) - CONTRIBUTING.md: update the Tobit known-gotcha to the remaining pitfall (lloq must be set on PKNCAconc) Co-Authored-By: Claude Fable 5 <[email protected]>
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.
Summary
Upstream humanpred/pknca issue 553
(closed 2026-06-11) wired the LLOQ from
PKNCAconc()through to the Tobithalf-life method, so
hl_method = "tobit"now works through the fullpk.nca()pipeline and the book's direct-call workaround note is obsolete.Verified empirically against PKNCA 0.12.1.9000 (GitHub eff79252, packaged
2026-07-24, R 4.6.1):
PKNCAconc(..., lloq = 0.1)+PKNCAdata(options = list(hl_method = "tobit"))pk.nca()runs cleanly and returns λz = 0.2659 / half-life = 2.607 h —identical to the direct
pk.calc.half.life(..., hl_method = "tobit")calland distinct from the log-linear control (2.393 h), with the two BLQ points
reported in
lambda.z.n.points_blq.lloqworks as a numeric scalar and as a column name.lloqstill errors ("lloq must be provided when hl_method is'tobit'"), so the LLOQ on the concentration object is required.
Changes
workaround note with a runnable end-to-end pipeline example in a new
section, "Tobit through the
pk.nca()pipeline (≥ 0.12.2)".pitfall: supply the LLOQ via
PKNCAconc(lloq = ).quarto renderpasses with no warnings or errors; the rendered chapter showsthe pipeline and direct-call results matching.
🤖 Generated with Claude Code