Skip to content

[jaspTTests] Add grouping variable label and Student's/Welch's distinction...#387

Open
sisyphus-jasp wants to merge 1 commit into
jasp-stats:masterfrom
sisyphus-jasp:fix-sisyphus-1773026039
Open

[jaspTTests] Add grouping variable label and Student's/Welch's distinction...#387
sisyphus-jasp wants to merge 1 commit into
jasp-stats:masterfrom
sisyphus-jasp:fix-sisyphus-1773026039

Conversation

@sisyphus-jasp
Copy link
Copy Markdown
Contributor

Summary

Fixes: jasp-stats/jasp-issues#3946

Root cause

Independent-samples output missed two metadata bits:

  • Main t-test table had no Student-vs-Welch distinction note when both tests enabled.
  • Group descriptives table always used generic Group header, never included selected grouping variable.

What changed

Edited R/ttestindependentsamples.R only:

  • In .ttestIndependentMainTable, added footnote when both Student and Welch are requested: Student assumes equal variances, Welch does not.
  • In .ttestIndependentDescriptivesTable, changed group column header from Group to Group (<group variable>) via gettextf().

Caveats / reviewer checks

  • Numeric/statistical outputs unchanged; metadata only (footnote + column title).
  • For encoded .jasp runs in headless tests, group variable may show encoded name (jaspColumnX). In Desktop UI this should map through normal display path.
Implementation Plan

Root cause

  • In R/ttestindependentsamples.R (.ttestIndependentDescriptivesTable), group column title hardcoded to gettext("Group"); selected grouping variable label/name not shown.
  • In .ttestIndependentMainTable, Student/Welch notes only exist in single-test (onlyTest) branch. With both enabled, table has both rows but no footnote clarifying difference.

Proposed changes

  • In .ttestIndependentDescriptivesTable, compute group column title with grouping variable (gettextf("Group (%s)", options[["group"]])) and use it in addColumnInfo().
  • In .ttestIndependentMainTable, when both wantsStudents and wantsWelchs are TRUE, add one footnote clarifying Student assumes equal variances and Welch does not.
  • Limit edits to R/ttestindependentsamples.R.

Expected test impact

  • Core numeric results unchanged.
  • Metadata changes (table footnotes / column title) can invalidate strict output snapshots/structure checks.
  • testAll() should pass unless expectations encode old metadata; then status NEEDS_TEST_UPDATE.

Add grouping variable label and Student's/Welch's distinction footnotes to independent samples t-test output

Attachment Descriptions

The following images were attached to the issue. They have been converted to text descriptions — the original image files are NOT available in the workspace. Do not reference screenshot filenames in your output.

Image

The screenshot shows JASP output for a T-Tests analysis, specifically an Independent Samples T-Test.

  • The output header reads “Independent Samples T–Test”.
  • The tested variable appears as “Wanting trash in taxes”.
  • Two test rows are shown:
    • Student: Statistic = 1.528, df = 573.000, p = .127
    • Welch: Statistic = 1.570, df = 55.100, p = .122

A Descriptives section is visible below:

  • Subheader: “Group Descriptives”
  • Columns shown include at least: Group, N, Mean, SD, SE (and an additional column beginning with “Co…” that is cut off).
  • For Wanting trash in taxes, two groups are listed:
    • Group 0: N = 528, Mean = 2.581, SD = 1.039, SE = 0.045
    • Group 1: N = 47, Mean = 2.340, SD = 1.006, SE = 0.147

No error trace or call stack is visible in the screenshot.
No analysis-option panel (checkboxes/dropdowns/radio buttons) is shown, so selected settings cannot be directly confirmed beyond what is implied by the displayed Student and Welch test outputs and the grouped descriptives table.

Test Results

Test Run Result
Baseline (pre-fix) [ FAIL 0 | WARN 0 | SKIP 0 | PASS 290 ]
Post-fix [ FAIL 0 | WARN 0 | SKIP 0 | PASS 290 ]
Upstream CI e4b7a08 -- CI: passing

Automated Code Review

Approved after 1 review iteration(s).

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.

[Feature Request]: t-test labels and information

1 participant