R/statpsych3.R
size.test.prop.ps.Rd
Computes the sample size required to test a difference in population proportions with desired power in a paired-samples design. This function requires planning values for both proportions and a phi coefficient that describes the correlation between the two dichotomous measurements. The proportion planning values can be set to .5 for a conservatively large sample size. The planning value for the effect size (proportion difference) could be set equal to the difference of the two proportion planning values or it could be set equal to a minimally interesting effect size. Set the phi correlation planning value to the smallest value within a plausible range for a conservatively large sample size.
size.test.prop.ps(alpha, pow, p1, p2, phi, es)
alpha level for hypothesis test
desired power
planning value of proportion for measurement 1
planning value of proportion for measurement 2
planning value of phi correlation
planning value of proportion difference
Returns the required sample size
size.test.prop.ps(.05, .80, .4, .3, .5, .1)
#> Sample size
#> 177
# Should return:
# Sample size
# 177