n.means {samplesizeestimator} | R Documentation |
Sample Size for Comparing Independent and dependent means
Description
This function computes the sample size based on three different methods i) comparing mean with a specified value ii) comparing two independent means iii) comparing two dependent means
Usage
n.means(
delta,
sd,
alp = 0.05,
pwr = 0.8,
type = "two",
alternative = "two.sided",
k = 1,
paired = FALSE
)
Arguments
delta |
anticipated difference between the two groups |
sd |
anticipated standard deviation |
alp |
anticipated level of significance or accepted level of type I error |
pwr |
desired power |
type |
string specifying the type of sample (one or two) |
alternative |
one or two sided alternative hypothesis |
k |
the ratio of control to experimental patients |
paired |
a logical argument indicating whether the sample is independent or dependent |
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
References
Lwanga, S. K., Lemeshow, S., & World Health Organization. (1991). Sample size determination in health studies: a practical manual. World Health Organization.
Examples
n.means(delta = 1.5, sd = 1, alp = 0.05, pwr = 0.9, type ="two",
alternative= "two.sided", k = 1, paired = FALSE)