Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uneven df for pairwise T-Test? #121

Open
Kh4rn opened this issue Aug 17, 2021 · 1 comment
Open

uneven df for pairwise T-Test? #121

Kh4rn opened this issue Aug 17, 2021 · 1 comment

Comments

@Kh4rn
Copy link

Kh4rn commented Aug 17, 2021

Is it possible to have uneven degres of freedom at pairwise t-test for independent groups?

My IV has 3 categories and the DV is metric with values between 1 und 10.

psyg.G <- data.na %>% pairwise_t_test( psyg ~ Groesse, pool.sd = FALSE, p.adjust.method = "holm", alternative = "greater", var.equal = FALSE)

grafik

If it is possible, how do I report these df ?
Like this?
(t(57.9) = 1.79; p.adj. = 0.039*)

And is it possible that the df differ between the DV, even if there are no missing values in the dataset?

grafik

@benediktclaus
Copy link

benediktclaus commented Oct 6, 2021

Hi @Kh4rn

The issues you report don't indicate any issues with the package rstatix or the function pairwise_t_test() but rather concern the underlying statistics. Please refer to a ressource of your choice (e.g., Discovering Statistics by Andy Field) to dig deeper on that topic. But some clarifications might be helpful for you.

Uneven degrees of freedom
If you read the documentation for pairwise_t_test() (with ?pairwise_t_test), you'll see that when you set pool.sd = FALSE, "the standard two sample t-test is applied to all possible pairs of groups." The standard two sample t-test in R is Welch's t-test, because it assumes the group variances to be not equal (which you also defined in your function call with var.equal = FALSE).

For Welch's t-test, the degrees of freedom are approximated with the Welch-Satterthwaite approximation, and this can yield degrees of freedom with decimal places (I assume that's what you meant by "uneven degrees of freedom").

Reporting
You can report the results of your first pairwise t-test with p-value correction like so:

The groups "klein" and "mittel" differed significantly on the outcome psyg, t(57.9) = 1.79, padj = .039.

However, you should apply the recommended style guide for your field of research (APA in the example above).

Different degrees of freedom
Because the degrees of freedom are (besides others) dependent on the sample sizes, they of course can differ in this particular case because your sample sizes are different in each comarison (columns n1 and n2 in the second output).

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

No branches or pull requests

2 participants