d_from_r_pearson: Obtain Cohen's _d_ from the Pearson correlation _r_

Description Usage Arguments Details Value References Examples

View source: R/d_from_r_pearson.R

Description

This function does not convert the Pearson correlation r to Cohen's d, because this is not possible. If two variables are continuous, it is not possible to compute a value of Cohen's d.

Usage

1
2
3
4
5
6
7
d_from_r_pearson(
  r_pearson,
  n,
  baseRateSensitive = FALSE,
  biasCorrect = FALSE,
  crosssectionalSampling = FALSE
)

Arguments

r_pearson

A numerical vector with one or more Pearson r values.

n

A numerical vector with the sample sizes of each Pearson r value. Note that the nth element of these vectors must correspond to the nth element of the r_pbs vector.

baseRateSensitive

Whether to compute the base rate sensitive Cohen's d or not (see McGrath & Meyer, 2006).

biasCorrect

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

crosssectionalSampling

Logical ...

Details

This function is included in the escalc package for two reasons. First, it provides a consistent API for users (i.e. every conversion function exists). Second, it allows informing users that they try to do something that isn't sensible.

Value

Invisibly, a data frame with three columns, as many rows as r_pearson and n are long, and filled with NAs for all cells except those in the last column.

References

McGrath, R. E. & Meyer, G. J. (2006) When Effect Sizes Disagree: The Case of r and d. Psychological Methods, 11, 386-401, doi:doi: 10.1037/1082-989X.11.4.386386

Examples

1
escalc::d_from_r_pearson(r_pearson = .3, n = 100)

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