Skip to content

update approach to isotonic calibration#47

Merged
malcolmbarrett merged 4 commits into
mainfrom
isotonic
Feb 18, 2026
Merged

update approach to isotonic calibration#47
malcolmbarrett merged 4 commits into
mainfrom
isotonic

Conversation

@malcolmbarrett

Copy link
Copy Markdown
Member
  • update isoreg calibration
  • remove news file until submission

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the isotonic regression calibration approach in ps_calibrate() to use a custom weighted pool-adjacent-violators algorithm (PAVA) instead of stats::isoreg(). The new implementation follows the two-step isotonic regression method described in van der Laan et al. (2024) and matches the behavior of WeightIt::calibrate(method = "isoreg").

Changes:

  • Implements custom pava_weighted() function for isotonic regression without grouping tied x-values
  • Updates ps_calibrate() to use two-step calibration: separate isotonic regressions for treated and control groups
  • Adds comprehensive unit tests for pava_weighted() covering edge cases and expected behavior
  • Removes stats::isoreg import from NAMESPACE (no longer needed)
  • Removes NEWS.md file temporarily until ready for submission

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
R/ps_calibration.R Adds new pava_weighted() internal function and updates ps_calibrate() to use two-step isotonic regression approach
tests/testthat/test-ps_calibration.R Adds 8 comprehensive unit tests for pava_weighted() function covering various edge cases
NAMESPACE Removes stats::isoreg import that is no longer used
NEWS.md Removes file temporarily (per PR description, will be added back for submission)
.Rbuildignore Adds .beads to build ignore list (likely a development tool configuration)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread R/ps_calibration.R
Comment thread R/ps_calibration.R Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@malcolmbarrett malcolmbarrett merged commit 1735d2e into main Feb 18, 2026
7 checks passed
@malcolmbarrett malcolmbarrett deleted the isotonic branch February 24, 2026 01:37
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