docs: correct adj.r.squared.factor, span.ratio, and aucint.inf description strings - #590
Closed
billdenney wants to merge 3 commits into
Closed
docs: correct adj.r.squared.factor, span.ratio, and aucint.inf description strings#590billdenney wants to merge 3 commits into
billdenney wants to merge 3 commits into
Conversation
…ption strings Three runtime description strings contradicted the implementation (issue 582): - The adj.r.squared.factor option description claimed an additive 'factor times the number of data points' criterion; the code keeps candidate lambda.z regressions with an adjusted r-squared within adj.r.squared.factor of the best and then selects the one with the most data points. - The span.ratio parameter desc stated the inverse ratio; the code computes the regression time span divided by the half-life. - The aucint.inf.obs, aucint.inf.pred, and .dose variant descs were copy-pasted from aucint.last/aucint.all; these parameters extrapolate beyond Tlast using the half-life and the observed or predicted Clast. Add regression tests pinning the corrected wording and a NEWS.md entry. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The aumcint.inf.obs, aumcint.inf.pred, and .dose variant descs carried the same copy-paste defect as their aucint.inf counterparts (issue 582): they described the AUMClast/AUMCall extrapolation rules, but these parameters extrapolate beyond Tlast using the half-life and the observed or predicted Clast. Extend the wording-pinning tests and the NEWS.md bullet to cover them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Per maintainer guidance, documentation-only changes (including parameter description strings and dead-code removal with no behavior change) do not need NEWS items. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Member
Author
|
To be replaced with a different version respecting the 40-character limit |
PavanLomati
pushed a commit
to PavanLomati/pknca
that referenced
this pull request
Aug 21, 2026
Fixes humanpred#582. Replaces humanpred#590, which predates the 40-character desc limit and whose replacement strings run 63-243 characters. adj.r.squared.factor described itself as a factor multiplied by the number of data points and added to the adjusted r^2. The code instead accepts every regression whose adjusted r^2 is within adj.r.squared.factor of the best and picks the one using the most points. This string is built by paste() for PKNCA.options() and is not subject to the desc length limit. span.ratio described itself as the half-life divided by the calculation duration, the inverse of what half.life.R computes: ret$span.ratio <- (max(data$time) - min(data$time))/ret$half.life The roxygen for pk.calc.half.life() already described it the correct way, so the registry string also contradicted the manual page. The eight dose-aware aucint*/aumcint* parameters ending in .dose described themselves as AUCdn/AUMCdn. In this package `dn` means dose normalized (auclast.dn, aucinf.obs.dn), while these parameters use dose-aware interpolation -- as their own pretty_name has always said. All replacements are within the 40-character limit. The aucint.inf/aumcint.inf copy-paste that humanpred#590 also fixed is already correct on main; the new tests pin it so it stays that way. Tests enumerate the parameter sets rather than listing cases, so a newly added interval parameter is covered automatically. Co-Authored-By: Claude Opus 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 #582.
Corrects three runtime description strings to match the implementation:
adj.r.squared.factor(within-tolerance-of-best selection, then most points — not an additive factor×n criterion; the v40 vignette renders this string),span.ratio(regression time span divided by half-life — the previous text was inverted), and the fouraucint.inf.*registry descriptions (copy-pasted fromaucint.last/aucint.all; now describe AUCinf-type extrapolation with observed/predicted Clast and the dose-aware variants). Each corrected string is pinned by anexpect_matchtest.Verification: 348 tests pass across the three touched test files; no man/ changes (runtime strings only); repository line-ending heterogeneity preserved byte-exactly.
Note: the
aumcint.inf.*registrations carry the identical copy-paste defect — not covered by this issue, flagged for a follow-up.🤖 Generated with Claude Code