Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Sep 9, 2025

This PR adds standard error columns to the main tabular outputs in classical meta-analysis, appearing immediately after estimate columns in:

  1. Pooled effect size estimates (Meta-Analytic Estimates table)
  2. Estimated marginal means tables
  3. Estimated contrasts tables

Key Features

User Control: Added a "Standard errors" checkbox in the Statistics section that allows users to show/hide Standard Error columns, similar to the existing "Confidence intervals" checkbox functionality.

Conditional Availability: The "Standard errors" checkbox is only enabled when transformEffectSize is set to "none". When effect size transformations are applied (exponential, Fisher's z, etc.), the checkbox becomes disabled since standard errors don't follow simple transformations.

Conditional Display: Standard Error columns only appear when both the "Standard errors" checkbox is checked AND transformEffectSize is set to "none". When effect size transformations are applied, Standard Error columns are hidden.

Proper Positioning: Standard Error columns are positioned immediately after estimate columns in all affected tables:

| Estimate | Standard Error | 95% CI Lower | 95% CI Upper | ...

Implementation Details

  • Added "Standard errors" checkbox to the Statistics QML section with proper translation support
  • Added conditional enabling - checkbox only enabled when transformation is "none"
  • Added .maAddSeColumn() helper function following existing patterns
  • Modified table creation functions to include Standard Error columns conditionally
  • Updated table dependencies to include the new standardError option for proper caching and refreshing
  • Updated data extraction logic to preserve SE values when no transformation is applied
  • Column title uses "Standard Error" with proper translation support via gettext()

User Experience

  • No transformation selected: SE checkbox enabled and functional
  • Any transformation selected: SE checkbox disabled (grayed out)
  • Checkbox checked + no transformation: SE columns visible
  • Checkbox unchecked: SE columns hidden (regardless of transformation)

Example Usage

# User has checkbox enabled AND transformEffectSize = "none" -> Standard Error column appears
options$standardError <- TRUE
options$transformEffectSize <- "none"

# User selects any transformation -> checkbox becomes disabled
options$transformEffectSize <- "exponential"  # checkbox grays out

# User unchecks checkbox -> no Standard Error column regardless of transformation
options$standardError <- FALSE

The implementation preserves all existing functionality while providing users with explicit control over standard error information display and preventing confusion when transformations are applied.

Fixes #362.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@Copilot Copilot AI changed the title [WIP] Add standard errors to classical meta-analysis tabular output Add standard errors to classical meta-analysis tabular output Sep 9, 2025
@Copilot Copilot AI requested a review from FBartos September 9, 2025 08:17
Copilot finished work on behalf of FBartos September 9, 2025 08:17
Copy link
Collaborator

@FBartos FBartos left a comment

Choose a reason for hiding this comment

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

@copilot

the changes look good, just make the title of the new column "Standard Error"
(don't forget on translation)

Copy link
Author

Copilot AI commented Sep 9, 2025

@copilot

the changes look good, just make the title of the new column "Standard Error"
...

Updated the SE column title to "Standard Error" with proper translation in commit 624b842. The column title now uses gettext("Standard Error") instead of gettext("SE").

@Copilot Copilot AI requested a review from FBartos September 9, 2025 09:33
Copilot finished work on behalf of FBartos September 9, 2025 09:33
Copy link
Collaborator

@FBartos FBartos left a comment

Choose a reason for hiding this comment

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

@copilot One more improvement please:
The Statistics section contains the confidenceInterval checkbox hides/shows the CI column. Add a new standardError checkbox with the same functionality for the newly added SE column (remember to add the checkbox to dependencies at the appropriate tables)

Copy link
Author

Copilot AI commented Sep 9, 2025

@copilot One more improvement please:
The Statistics section contains the confidenceInterval checkbox hides/shows the CI column. Add a new standardError checkbox with the same functionality for...

Added a standardError checkbox to the Statistics section with the same functionality as the confidenceInterval checkbox. The checkbox controls the visibility of Standard Error columns in all affected tables and is included in their dependencies. SE columns now show when both the checkbox is checked AND no effect size transformation is applied. Implemented in commit 3ae2100.

@Copilot Copilot AI changed the title Add standard errors to classical meta-analysis tabular output Add standard errors to classical meta-analysis tabular output with user control Sep 9, 2025
@Copilot Copilot AI requested a review from FBartos September 9, 2025 09:52
Copilot finished work on behalf of FBartos September 9, 2025 09:52
@Copilot Copilot AI requested a review from FBartos September 9, 2025 11:37
Copilot finished work on behalf of FBartos September 9, 2025 11:37
@FBartos FBartos marked this pull request as ready for review September 10, 2025 09:51
Copy link
Contributor

@Copilot 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 adds configurable standard error columns to tabular outputs in classical meta-analysis. The feature allows users to show/hide standard error information via a new checkbox in the Statistics section, with intelligent enabling/disabling based on effect size transformation settings.

Key changes:

  • Added "Standard errors" checkbox with conditional availability based on transformation settings
  • Implemented .maAddSeColumn() helper function following existing column addition patterns
  • Modified table creation to conditionally include Standard Error columns after estimate columns

Reviewed Changes

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

File Description
inst/qml/qml_components/ClassicalMetaAnalysisStatistics.qml Added "Standard errors" checkbox with conditional enabling logic and proper QML structure
R/classicalmetaanalysiscommon.R Implemented .maAddSeColumn() helper, updated table dependencies, modified table creation to include SE columns, and removed redundant column filtering

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.

Add standard errors to classical meta-analysis tabular output
2 participants