Learn R Programming

MOTE (version 1.2.2)

h_prop: Cohen's h for Independent Proportions

Description

This function computes Cohen's \(h\) effect size for the difference between two independent proportions. Cohen's \(h\) is defined as a difference between arcsine-transformed proportions:

Usage

h_prop(p1, p2, n1, n2, a = 0.05)

h.prop(p1, p2, n1, n2, a = 0.05)

Value

A list containing Cohen's \(h\) effect size and related statistics:

  • `h` – Cohen's h.

  • `hlow`, `hhigh` – lower and upper confidence interval limits.

  • `h_lower_limit`, `h_upper_limit` – snake_case aliases for the confidence limits.

  • `p1`, `p2` – input proportions for each group.

  • `n1`, `n2` – sample sizes for each group, with snake_case aliases `sample_size_1`, `sample_size_2`.

  • `z`, `p` – z statistic and p value for the difference in proportions using a pooled-proportion standard error.

  • `z_value`, `p_value` – snake_case aliases for the z statistic and p value.

  • `estimate` – APA-style formatted string for Cohen's h and its confidence interval.

  • `statistic` – APA-style formatted string for the z test of the difference in proportions.

Arguments

p1

Proportion for group one (between 0 and 1).

p2

Proportion for group two (between 0 and 1).

n1

Sample size for group one.

n2

Sample size for group two.

a

Significance level used for confidence intervals. Defaults to 0.05.

Details

$$h = 2 \arcsin \sqrt{p_1} - 2 \arcsin \sqrt{p_2}$$

where \(p_1\) and \(p_2\) are proportions for groups 1 and 2, respectively.

Using a simple large-sample approximation (via the delta method), the standard error of \(h\) can be taken as:

$$\mathrm{SE}(h) \approx \sqrt{1 / n_1 + 1 / n_2}$$,

which leads to a \((1 - \alpha)\) confidence interval for \(h\):

$$h \pm z_{1 - \alpha/2} \, \mathrm{SE}(h).$$

This effect size is commonly recommended for differences in proportions (Cohen, 1988) and is particularly useful for power analysis and meta-analysis when working directly with proportions.

Examples

Run this code
h_prop(p1 = .25, p2 = .35, n1 = 100, n2 = 100, a = .05)

Run the code above in your browser using DataLab