[jaspLearnStats] Fix issue #3107: Change default value of delta from 0 to 0.5 in Lea...#147
Merged
FBartos merged 1 commit intojasp-stats:masterfrom Feb 24, 2026
Conversation
…0 to 0.5 in Lea...
There was a problem hiding this comment.
Pull request overview
This PR updates the default effect size inputs in the Learn Stats “Effect sizes” UI so that δ (Cohen’s delta), ρ (Pearson correlation), and φ (contingency coefficient) start at 0.5 instead of 0, aligning the defaults with the intended educational examples and avoiding the “phi=0” initial plot label crowding described in issue #3107.
Changes:
- Updated the default value for Cohen’s δ from 0 to 0.5.
- Updated the default value for Pearson’s ρ from 0 to 0.5.
- Updated the default value for contingency φ from 0 to 0.5 (plus a minor whitespace-only cleanup).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
FBartos
approved these changes
Feb 23, 2026
Collaborator
FBartos
left a comment
There was a problem hiding this comment.
fixes the first part of the issue (the figure scaling still needs more work
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Issue: https://github.com/jasp-stats/INTERNAL-jasp/issues/3107
PR Summary for Issue #3107
What was wrong
What was changed
Modified
/workspace/inst/qml/LSeffectSizes.qml:defaultValue: 0todefaultValue: 0.5foreffectSizeValueDelta(Cohen's δ)defaultValue: 0todefaultValue: 0.5foreffectSizeValueRho(Pearson ρ)defaultValue: 0todefaultValue: 0.5foreffectSizeValuePhi(Contingency φ)Why this fixes the overlapping x-axis labels
With phi=0, the plot's x-axis range was symmetric but small ([-0.5, 0.5]), causing tick labels to overlap. With phi=0.5, the range becomes wider and asymmetric ([-0.612, 0.354]), providing more spacing between tick labels and eliminating the overlap.
Test impact
No existing tests in this module (tests/testthat/ is empty except for .gitkeep). No regressions expected.
Implementation Plan
Implementation Plan: Issue #3107
Issue Summary
Root Cause Analysis
Default Values Issue
The QML file
inst/qml/LSeffectSizes.qmlhas effect size default values set to 0:effectSizeValueDelta(Cohen's δ) hasdefaultValue: 0effectSizeValueRho(Pearson ρ) hasdefaultValue: 0effectSizeValuePhi(Contingency φ) hasdefaultValue: 0Overlapping X-axis Labels Issue
In the R file
R/LSeffectSizes.R, the phi (contingency coefficient) population plot function.tsPhiMakePopulationPlotat lines 1126 uses:When phi=0 (default), the x-axis range is very small (centered around 0), causing tick labels to overlap. Changing the default to 0.5 will expand the range and reduce overlap.
Proposed Changes
1. QML Changes (inst/qml/LSeffectSizes.qml)
defaultValue: 0todefaultValue: 0.5foreffectSizeValueDeltadefaultValue: 0todefaultValue: 0.5foreffectSizeValueRhodefaultValue: 0todefaultValue: 0.5foreffectSizeValuePhi2. R Changes (R/LSeffectSizes.R)
The overlapping x-axis issue may be resolved by changing the default value from 0 to 0.5, which expands the axis range. However, if additional fixes are needed:
.tsPhiMakePopulationPlot(line 1126).tsPhiMakeSimulationPlot(line 1187).tsPhiMakeCombinedPlot(line 1254)Expected Test Impact
Since this module has no existing tests in
tests/testthat/, no test failures are expected. The changes only affect default values and should not break any functionality.Implementation Steps
Test Results