d_from_MSE: Obtain Cohen's _d_ from mean squared error

Description Usage Arguments Details Value References Examples

View source: R/d_from_MSE.R

Description

This function converts mean squared error from one-way F tests to Cohen's d.

Usage

1
d_from_MSE(MSE, m1, m2, n1, n2, biasCorrect = FALSE)

Arguments

MSE

A numerical vector with one or more mean squared error values.

m1, m2

A numerical vector with the means of the two groups formed by the dichotomous variable. Note that the nth element of these vectors must correspond to the nth elements of the MSE vector.

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 elements of the MSE vector.

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. Thalheimer & Cook, 2002):

d= \frac{\hat{x}_1 - \hat{x}_2} {MSE (\frac{n_1 + n_2 - 2}{n_1 + n_2})}

Value

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

References

Thalheimer, W., & Cook, S. (2002, August). How to calculate effect sizes from published research articles: A simplified methodology.

Examples

1
2
3
4
5
escalc::d_from_MSE(MSE = 2.046,
                   m1 = .024,
                   m2 = .301,
                   n1 = 50,
                   n2 = 50);

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