Skip to content

Add ESS extensions#48

Merged
malcolmbarrett merged 3 commits into
mainfrom
plot_ess
Aug 6, 2025
Merged

Add ESS extensions#48
malcolmbarrett merged 3 commits into
mainfrom
plot_ess

Conversation

@malcolmbarrett

Copy link
Copy Markdown
Member

No description provided.

@malcolmbarrett
malcolmbarrett requested a review from Copilot August 6, 2025 00:06

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 adds Effective Sample Size (ESS) extensions to the halfmoon package, including a new check_ess() function for computing ESS metrics and a plot_ess() function for visualizing them. The PR extends the package's balance diagnostics functionality to help users assess weight variability and potential instability in weighted estimates.

  • Added check_ess() function to compute effective sample size for different weighting schemes
  • Added plot_ess() function to create bar plot visualizations of ESS values
  • Enhanced ess() function to handle missing values with na.rm parameter

Reviewed Changes

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

Show a summary per file
File Description
R/check_ess.R New function to compute ESS metrics with optional grouping support
R/plot_ess.R New function to create bar chart visualizations of ESS values
R/ess.R Enhanced existing ESS function to handle NA values
tests/testthat/test-check_ess.R Comprehensive test suite for the new check_ess function
tests/testthat/test-plot_ess.R Test suite for the plot_ess visualization function
man/*.Rd Documentation files for the new functions and updated cross-references
NAMESPACE Export declarations for the new functions
DESCRIPTION Added scales dependency for plot formatting
Comments suppressed due to low confidence (1)

tests/testthat/test-plot_ess.R:128

  • The snapshot tests use expect_doppelganger() which suggests visual regression testing, but this function is not commonly available in standard testthat. Ensure this function is properly available in your testing environment or consider using standard plot testing approaches.
test_that("plot_ess snapshot tests", {

Comment thread R/utils-validation.R
Comment thread R/plot_ess.R
@malcolmbarrett
malcolmbarrett merged commit 96ac346 into main Aug 6, 2025
8 checks passed
@malcolmbarrett
malcolmbarrett deleted the plot_ess branch August 6, 2025 00:13
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