d_from_t_in: Obtain Cohen's _d_ from Student's _t_

Description Usage Arguments Details Value References Examples

View source: R/d_from_t_in.R

Description

This function converts Student's t to Cohen's d.

Usage

1
d_from_t_in(t, n1, n2, assumeHomoscedacity = TRUE, biasCorrect = FALSE)

Arguments

t

A numerical vector with one or more t values.

n1, n2

A numerical vector with the sample sizes of the two groups formed by the dichotomous variable. Note that the nth element of these vectors must correspond to the nth element of the t vector.

assumeHomoscedacity

Whether Student's t is used (assuming equal variances, or homoscedacity), or Welch's t (assuming unequal variances, or heteroscedacity). Note that if the variance in the two groups is not equal, as yet, no method exists for this conversion.

biasCorrect

Logical to indicate if the d-values should be bias-corrected. Can also be a vector.

Details

The formula that is used is the following (see e.g. Lakens, 2013):

d=t*sqrt(1/n1 + 1/n2))

Value

A data frame with in the first column, Cohen's d values, and in the second column, the corresponding variances.

References

Lakens, D. (2013) Calculating and reporting effect sizes to facilitate cumulative science: a practical primer for t-tests and ANOVAs. Frontiers in Psychology, 4, p. 863. doi: 10.3389/fpsyg.2013.00863

Examples

1
2
3
escalc::d_from_t_in(t = 2.828427,
                    n1 = 126,
                    n2 = 89);

wviechtb/escalc documentation built on Jan. 9, 2020, 4:14 p.m.