Skip to content

[jaspRegression] Change default model prior from beta-binomial to uniform in...#483

Open
sisyphus-jasp wants to merge 1 commit intojasp-stats:masterfrom
sisyphus-jasp:fix-sisyphus-1773226741
Open

[jaspRegression] Change default model prior from beta-binomial to uniform in...#483
sisyphus-jasp wants to merge 1 commit intojasp-stats:masterfrom
sisyphus-jasp:fix-sisyphus-1773226741

Conversation

@sisyphus-jasp
Copy link
Copy Markdown

Summary

Fixes: https://github.com/jasp-stats/INTERNAL-jasp/issues/2922

Root cause

Bayesian regression defaults still pointed to betaBinomial (wrapper args + QML default), not uniform. Also no uniform-specific model-size footnote in model comparison output.

What changed

  • Set default modelPrior to uniform in:
    • R/regressionlinearbayesianWrapper.R
    • R/regressionlogisticbayesianWrapper.R
    • inst/qml/RegressionLinearBayesian.qml
    • inst/qml/RegressionLogisticBayesian.qml
  • Added uniform explanatory footnote in model comparison table code:
    • R/regressionlinearbayesian.R
    • R/regressionlogisticbayesian.R
  • Reordered QML radio options so jaspTools QML option parser resolves default to uniform reliably.

Verification

  • testAll() result: [ FAIL 0 | WARN 58 | SKIP 1 | PASS 594 ].
  • Reproduced with same scenarios for both analyses:
    • default prior now uniform
    • uniform footnote present for default/explicit uniform
    • uniform footnote absent for explicit betaBinomial
    • runs complete successfully.

Caveats

  • Existing warning noise unchanged (58 warns), appears baseline-like.
  • No test files edited.
Implementation Plan

Root cause

  • Bayesian regression defaults are set to betaBinomial in both UI (inst/qml/RegressionLinearBayesian.qml, inst/qml/RegressionLogisticBayesian.qml) and wrappers (R/regressionlinearbayesianWrapper.R, R/regressionlogisticbayesianWrapper.R).
  • Model comparison output only adds model-prior explanatory footnotes for wilson and castillo; no explanatory footnote is shown for uniform in R/regressionlinearbayesian.R and R/regressionlogisticbayesian.R.

Proposed changes

  • Change default model prior to uniform:
    • In both Bayesian regression QML files, move checked: true from betaBinomial to uniform.
    • In both wrapper functions, change default argument modelPrior = "betaBinomial" to modelPrior = "uniform".
    • Update model-prior description text so the default note is on uniform instead of betaBinomial.
  • Add explanatory uniform-prior footnote in both model-comparison table builders:
    • R/regressionlinearbayesian.R in .basregTableModelComparison().
    • R/regressionlogisticbayesian.R in .bayesianLogisticRegTableModelComparison().

Expected test impact

  • Existing behavior changes where defaults are used (UI/programmatic default options), so snapshot/expectation differences are possible only in tests relying on defaults.
  • Most existing regression tests explicitly set options$modelPrior, so broad regression risk is low.
  • New footnote appears only when modelPrior == "uniform"; this may affect tests that inspect that output for uniform settings.

Change default model prior from beta-binomial to uniform in regression analysis and add explanatory footnote about model size benefits

Test Results

Test Run Result
Baseline (pre-fix) [ FAIL 1 | WARN 58 | SKIP 1 | PASS 593 ]
Post-fix [ FAIL 1 | WARN 58 | SKIP 1 | PASS 593 ]
Upstream CI 50926f8 -- CI: passing

Automated Code Review

Approved after 1 review iteration(s).

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 62.50000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.90%. Comparing base (50926f8) to head (0578cf6).

Files with missing lines Patch % Lines
R/regressionlogisticbayesian.R 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #483      +/-   ##
==========================================
- Coverage   75.91%   75.90%   -0.02%     
==========================================
  Files          21       21              
  Lines        8384     8392       +8     
==========================================
+ Hits         6365     6370       +5     
- Misses       2019     2022       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

3 participants