rstatix icon indicating copy to clipboard operation
rstatix copied to clipboard

uneven df for pairwise T-Test?

Open Kh4rn opened this issue 3 years ago • 1 comments

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

Kh4rn avatar Aug 17 '21 10:08 Kh4rn

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).

benediktclaus avatar Oct 06 '21 08:10 benediktclaus