d_from_p_t_in: Obtain Cohen's _d_ from p-value of an independent samples...

Description Usage Arguments Value Examples

View source: R/d_from_p_t_in.R

Description

This function converts p-values from independent samples t-tests to Cohen's d values.

Usage

1
2
3
4
5
6
7
8
9
d_from_p_t_in(
  p,
  n1,
  n2,
  side,
  sign,
  assumeHomoscedacity = TRUE,
  biasCorrect = TRUE
)

Arguments

p

Numerical vector with the (one- or two-sided) p-values.

n1, n2

Numerical vectors with the sample sizes of the two groups.

side

Numerical vector to indicate the sidedness of the p-values. (1 for a one-sided and 2 for a two-sided p-value)

sign

Numerical vector to indicate the sign of the d-values (+1 or -1; only relevant for two-sided p-values; for one-sided p-values, this can be set to NA).

assumeHomoscedacity

Logical to indicate if the p-values come from independent samples t-tests that have assumed homoscedacity (equal variances in the two groups) or not. Can also be a vector.

biasCorrect

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

Value

A numeric vector of Cohen's d values.

Examples

1
d_from_p_t_in(p = .038, n1=22, n2=25, side=2, sign=-1)

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