Marcin
Marcin

Reputation: 8044

h (effect size) parameter in pwr package in R

I am calculating the sample size for proportion test. I would like to have significance level =0.05, power = 0.90 and that the effect size is greater that 5%.

I would like to have statistically significance result if the difference in proportions is more that 5%.

But when I use pwr.2p.test function from pwr package to calculate sample size

pwr.2p.test(sig.level = 0.05, power =0.9, h=0.2, alternative="greater")

I have to specify effect size as Cohen's D. But it's range is said to be in (-3,3), and interpretation of this is:

The meaning of effect size varies by context, but the standard interpretation offered by Cohen (1988) is: cited from here

.8 = large (8/10 of a standard deviation unit)

.5 = moderate (1/2 of a standard deviation)

.2 = small (1/5 of a standard deviation)

My question is, how to formulate that I'd like to detect that there is more that 5% difference in proportions in 2 groups in a Cohen's d statistic?

Thanks for any help!

Upvotes: 0

Views: 1902

Answers (1)

Taciano Morais Silva
Taciano Morais Silva

Reputation: 499

I used the function ES.h of the package pwr. This function calculate the Effect Size between two proportions. For p1 = 100% and p2 = 95%, we have:

h = ES.h(1, 0.95) = 0.4510268

I understand that this effect size informs the need to detect the distance between the hypothesis.

I'm not very secure in my interpretation, but I used this value to determine the sample size.

pwr.p.test(h=h, sig.level = 0.05, power = 0.8)

Determining the sample size to detect up to 5 points difference in the proportions:

n = 38.58352

To detect a difference of 10 points, the sample size decreases because the accuracy decreases. So, to h = ES.h(1, 0.90) = 0.6435011, so we have: n = 18.95432.

This is my interpretation? What do you think? Am I right?

Upvotes: 2

Related Questions