jasp-issues icon indicating copy to clipboard operation
jasp-issues copied to clipboard

[Feature Request]: Specify non-zero null hypothesis in t test module

Open jlwoodard opened this issue 3 years ago • 4 comments

Description

The alternate hypothesis choices for the paired and independent groups situations in the t test module seem to imply a null hypothesis of 0. Some studies may hypothesize that a pre-post difference of at least 5 or more is hypothesized, for example. I see no way to specify this a priori null hypothesis mu

Purpose

To permit the user to specify a non-zero mu (test value) for the null hypothesis in the paired and independent groups t tests, which is readily available in R code.

Use-case

t.test(MyData$After, MyData$Before, mu=5, alternative="greater", paired=T) for the paired t test. A similar specification for mu in the independent groups situation would also be expected.

Is your feature request related to a problem?

No

Describe the solution you would like

Offer the user a choice to add a non-zero null hypothesis value (test value) for the paired and independent groups t test.

Describe alternatives that you have considered

I have looked through the possible specifications in the t test module. I can do the pre-post analysis or test a hypothesized group mean difference using the one-sample t test on the difference scores, but adding a test value option in the paired and independent groups would be helpful. It would not immediately be obvious to most users to approach the analysis using a one-sample test.

Additional context

No response

jlwoodard avatar Nov 03 '22 18:11 jlwoodard

@jlwoodard, thanks for the request.

juliuspfadt avatar Nov 04 '22 10:11 juliuspfadt

I believe this would be a simple yet valuable addition, potentially even for the next release, as it can be implemented fairly quickly. @JohnnyDoorn Are you the right person for this (as in maintainer t-test module??

koenderks avatar Mar 27 '25 14:03 koenderks

Yes, excellent suggestion! I can do this, or perhaps it could serve as a good intro project for @TarandeepKang (since it's adding a single option, where the one-sample t-test already serves as an example)?

JohnnyDoorn avatar Mar 27 '25 14:03 JohnnyDoorn

Excellent news! Thank you for working on it!!

All the best,

John

John L. Woodard, Ph.D. Professor of Psychology Licensed Psychologist Editor-in-Chief, Journal of the International Neuropsychological Societyhttps://www.cambridge.org/core/journals/journal-of-the-international-neuropsychological-society Wayne State University 5057 Woodward Avenue, 7th Floor Detroit, MI 48202

(313) 577-5838 (voice) (313) 577-7636 (fax) @.***

https://cambridge.org/INS[PastedGraphic-2.png]

On Mar 27, 2025, at 15:56, Johnny van Doorn @.***> wrote:

[EXTERNAL]

Yes, excellent suggestion! I can do this, or perhaps it could serve as a good intro project for @TarandeepKanghttps://github.com/TarandeepKang (since it's adding a single option, where the one-sample t-test already serves as an example)?

— Reply to this email directly, view it on GitHubhttps://github.com/jasp-stats/jasp-issues/issues/1887#issuecomment-2758371984, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMYNFK4BCWWJAF3C3JYNPQD2WP7QXAVCNFSM6AAAAABZ5E6GUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONJYGM3TCOJYGQ. You are receiving this because you were mentioned.Message ID: @.***>

[JohnnyDoorn]JohnnyDoorn left a comment (jasp-stats/jasp-issues#1887)https://github.com/jasp-stats/jasp-issues/issues/1887#issuecomment-2758371984

Yes, excellent suggestion! I can do this, or perhaps it could serve as a good intro project for @TarandeepKanghttps://github.com/TarandeepKang (since it's adding a single option, where the one-sample t-test already serves as an example)?

— Reply to this email directly, view it on GitHubhttps://github.com/jasp-stats/jasp-issues/issues/1887#issuecomment-2758371984, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMYNFK4BCWWJAF3C3JYNPQD2WP7QXAVCNFSM6AAAAABZ5E6GUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONJYGM3TCOJYGQ. You are receiving this because you were mentioned.Message ID: @.***>

jlwoodard avatar Mar 27 '25 14:03 jlwoodard