Skip to content

Fix guesst() sigEmax label and refactor internal model handling - #49

Merged
MThomas91 merged 1 commit into
masterfrom
minor_fixes
Jul 30, 2026
Merged

Fix guesst() sigEmax label and refactor internal model handling#49
MThomas91 merged 1 commit into
masterfrom
minor_fixes

Conversation

@bbnkmp

@bbnkmp bbnkmp commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Bug fix:

  • guesst(): the sigEmax steepness parameter returned for 3+ dose-response pairs was mislabeled "delta" instead of "h", inconsistent with the 2-pair branch and the rest of the package.

Internal refactoring (no changes to function inputs/outputs):

  • Centralize built-in model metadata: add internal builtInMods (model names) and nParMod (parameter counts) in drmodels.R and use them in fitMod, fitMod_helpers, maFitMod, MCPMod, Mods_helpers (checkEntries) and optDesign_helpers (nPars), removing several hard-coded copies. bFitMod keeps its own C-coupled ordering (now documented).
  • Deduplicate the lg2() and xlogx() helpers: define them once in drmodels.R and drop the inline copies in sigEmaxGrad, betaMod and betaModGrad.
  • Replace 1:length(x) / 1:nrow() / 1:ncol() idioms with seq_along() / seq_len() across the package for zero-length robustness.

All 596 testthat tests pass (0 failures, 0 warnings).

Bug fix:
* guesst(): the sigEmax steepness parameter returned for 3+ dose-response
  pairs was mislabeled "delta" instead of "h", inconsistent with the
  2-pair branch and the rest of the package.

Internal refactoring (no changes to function inputs/outputs):
* Centralize built-in model metadata: add internal builtInMods (model
  names) and nParMod (parameter counts) in drmodels.R and use them in
  fitMod, fitMod_helpers, maFitMod, MCPMod, Mods_helpers (checkEntries)
  and optDesign_helpers (nPars), removing several hard-coded copies.
  bFitMod keeps its own C-coupled ordering (now documented).
* Deduplicate the lg2() and xlogx() helpers: define them once in
  drmodels.R and drop the inline copies in sigEmaxGrad, betaMod and
  betaModGrad.
* Replace 1:length(x) / 1:nrow() / 1:ncol() idioms with seq_along() /
  seq_len() across the package for zero-length robustness.

All 596 testthat tests pass (0 failures, 0 warnings).
@MThomas91
MThomas91 merged commit a8b5d60 into master Jul 30, 2026
2 checks passed
@MThomas91
MThomas91 deleted the minor_fixes branch July 30, 2026 09:27
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.

2 participants