Skip to content

Add ps_calib vctr#45

Merged
malcolmbarrett merged 2 commits into
mainfrom
fix_calib
Aug 24, 2025
Merged

Add ps_calib vctr#45
malcolmbarrett merged 2 commits into
mainfrom
fix_calib

Conversation

@malcolmbarrett

Copy link
Copy Markdown
Member

No description provided.

@malcolmbarrett malcolmbarrett requested a review from Copilot August 24, 2025 17:01

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 introduces a new ps_calib vector class to replace the use of psw objects for calibrated propensity scores, providing a more specialized type for propensity score calibration functionality.

  • Creates a new ps_calib vector class with comprehensive vctrs machinery
  • Updates ps_calibrate() to return ps_calib objects instead of psw objects
  • Adds weight calculation methods for the new ps_calib class

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
R/ps_calibration.R Implements new ps_calib class with constructor, vctrs methods, and updates ps_calibrate() function
R/weights.R Adds weight calculation methods (wt_ate, wt_att, etc.) for ps_calib objects
R/weights-utils.R Updates utility function to handle ps_calib objects in weight calculations
man/ps_calibrate.Rd Updates documentation to reflect return of ps_calib instead of psw objects
tests/testthat/test-ps_calibration.R Updates tests to expect ps_calib class and adds new metadata testing
NAMESPACE Exports new S3 methods for the ps_calib class

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread R/ps_calibration.R
Comment thread R/ps_calibration.R
Comment thread R/ps_calibration.R
@malcolmbarrett malcolmbarrett merged commit a4cb178 into main Aug 24, 2025
7 checks passed
@malcolmbarrett malcolmbarrett deleted the fix_calib 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