es.w: Cohen w effect size calculation for chi-square tests

es.wR Documentation

Cohen w effect size calculation for chi-square tests

Description

Calculates the w effect size for chi-square tests. For chi-square goodness of fit tests, specify p0vec and p1vec. For chi-square tests of independence, provide a matrix of cell probabilities. Based on Cohen (1988).

Usage

es.w(p0vec = NULL, p1vec = NULL, pmatrix = NULL)

Arguments

p0vec

The first vector of probabilities. Both p0vec and p1vec, or pmatrix must be specified.

p1vec

The second vector of probabilities. Both p0vec and p1vec, or pmatrix must be specified.

pmatrix

The two-way probability table. Both p0vec and p1vec, or pmatrix must be specified.

Details

Cohen J (1988) Statistical Power Analysis for the Behavioral Sciences, 2nd edition. Lawrence Erlbaum Associates, Hillsdale, New Jersey

Value

A list of the arguments and the w effect size.

Examples

es.w(p0vec = c(0.5, 0.3, 0.2), p1vec = c(0.7, 0.2, 0.1))
es.w(pmatrix = matrix(c(0.050, 0.350, 0.100, 0.075, 0.250, 0.175), nrow = 2, byrow = TRUE))

powertools documentation built on April 4, 2025, 5:02 a.m.

Related to es.w in powertools...