effect_size: Effect sizes

Description Usage Arguments Details Examples

Description

Several measures of effect size and easy conversations between them.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
cohensd2r(d, n1 = NULL, n2 = n1, var = FALSE)

odds_ratio(.a, .b, .c, .d, method = c("hits_misses", "hits_all"), ...)

risk_ratio(.a, .b, .c, .d, method = c("hits_misses", "hits_all"), ...)

odds2d(odds, var = FALSE, ...)

odds2r(odds, n1 = NULL, n2 = n1, var = FALSE, ...)

r2cohensd(r, finite = FALSE)

Arguments

d

Cohen's d

n1, n2

Group sizes, see details for me

var

Logical, if 'TRUE', computes variance

.a, .b, .c, .d

Values in a contengency table; or '.a' can be a table (see details for more)

...

Additional arguments sent to methods

odds

A vector of odds ration values

r

Correlation coefficient

finite

Logical, if 'TRUE', will not return values of 'Inf' or '-Inf'

Details

'odds_ratio()' will not return -Inf Contigency table values: column row c1 c2 r1 a b r2 c d

Inside 'cohend()', 'n1' defaults to 4 when 'NULL'. Otherwise, 'n2' will default to 'n1' if not set.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
set.seed(42)
a <- table(
  "guess" = sample(0:1, 42, TRUE),
  "real" = sample(0:1, 42, TRUE)
)
odds_ratio(a)
risk_ratio(a)
d <- c(.1, -.4, 1, 4)
(rs <- cohensd2r(d))
r2cohensd(rs)

jmbarbone/qpm documentation built on July 25, 2020, 10:41 p.m.