nprop {samplesizeestimator} | R Documentation |
Estimate sample size for hypothesis testing on proportions
Description
This function computes the sample size based on two different methods i) comparing proportion with a specified (reference) value ii) comparing two independent proportions
Usage
nprop(p1, p2, alp, pwr, type = "two", alternative = "two.sided", k = 1)
Arguments
p1 |
hypothesized or reported proportion |
p2 |
anticipated proportion in the population of interest |
alp |
level of significance or accepted level of probability of type I error |
pwr |
desired level of power |
type |
character string stating number of groups i.e. |
alternative |
a character string specifying the alternative hypothesis, must be one of |
k |
ratio of number of subjects in the two groups |
Value
a list object, the required minimum sample size along with description for reporting
Author(s)
R. Amala, Scientist-C, ICMR-VCRC, Puducherry & G. Kumarapandiyan, Asst. Prof., Madras Christian College, Chennai
Examples
nprop(p1=0.5, p2=0.4, alp=0.05, pwr=0.90, type="one",
alternative="one.sided", k=1)
nprop(p1=0.05, p2=0.15, alp=0.05, pwr=0.90, type="two",
alternative="one.sided", k=1)