Skip to content

Update argument consistency to match propensity#51

Merged
malcolmbarrett merged 8 commits intomainfrom
args
Aug 13, 2025
Merged

Update argument consistency to match propensity#51
malcolmbarrett merged 8 commits intomainfrom
args

Conversation

@malcolmbarrett
Copy link
Member

No description provided.

@malcolmbarrett malcolmbarrett requested a review from Copilot August 13, 2025 17:44
Copy link
Contributor

Copilot AI left a comment

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 argument consistency throughout the halfmoon package to match the .exposure parameter name from propensity scoring functions. The changes standardize parameter naming to improve consistency and user experience across the API.

Key changes include:

  • Renamed treatment to .exposure and weights to .weights throughout test files
  • Updated .wts to .weights in function calls
  • Changed reference_group to .reference_level for categorical variables
  • Updated treatment_level to .focal_level for focal level specifications

Reviewed Changes

Copilot reviewed 88 out of 101 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/testthat/test-plot_stratified_residuals.R Updates function calls to use .exposure instead of treatment
tests/testthat/test-plot_roc.R Changes aesthetic mapping from truth to exposure
tests/testthat/test-plot_qq.R Updates .wts to .weights throughout
tests/testthat/test-plot_mirror_distributions.R Updates weight and reference level parameter names
tests/testthat/test-plot_ess.R Updates weight parameter names throughout
tests/testthat/test-plot_balance.R Updates weight and reference level parameter names
tests/testthat/test-numeric-psw-equivalence.R Updates weight parameter names for balance functions
tests/testthat/test-geom_roc.R Updates aesthetic mapping and focal level parameter
tests/testthat/test-geom_calibration.R Updates focal level parameter name
tests/testthat/test-error-messages.R Updates parameter names in error tests
tests/testthat/test-compute_qq.R Updates weight and reference level parameter names
tests/testthat/test-compute_balance_categorical.R Updates balance function parameter names
tests/testthat/test-compute_balance.R Updates all balance function parameter names
tests/testthat/test-check_model_auc.R Updates weight and focal level parameter names
tests/testthat/test-check_ess.R Updates weight parameter names
tests/testthat/test-check_balance.R Updates weight and reference level parameter names
tests/testthat/test-bal_qq.R Updates weight and reference level parameter names
tests/testthat/test-bal_prognostic_score.R Updates exposure, covariate, and weight parameter names
tests/testthat/test-bal_model_auc.R Updates focal level parameter name
tests/testthat/test-autoplot-methods.R Updates weight parameter names
man/*.Rd files Updates documentation parameter names
_snaps/*.md files Updates snapshot test parameter names

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

@malcolmbarrett malcolmbarrett merged commit 919ac62 into main Aug 13, 2025
9 checks passed
@malcolmbarrett malcolmbarrett deleted the args branch August 13, 2025 18:02
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.

1 participant