size.ci.ratio.mean2 | R Documentation |
Computes the sample size in each group required to estimate a ratio of population means with desired confidence interval precision in a 2-group design. This function requires planning values for each mean and the sample size requirement is very sensitive to these planning values. Set the variance planning value to the largest value within a plausible range for a conservatively large sample size.
size.ci.ratio.mean2(alpha, var, m1, m2, r, R)
alpha |
alpha level for 1-alpha confidence |
var |
planning value of average within-group variance |
m1 |
planning value of mean for group 1 |
m2 |
planning value of mean for group 2 |
r |
desired upper to lower confidence interval endpoint ratio |
R |
n2/n1 ratio |
Returns the required sample size for each group
size.ci.ratio.mean2(.05, .4, 3.5, 3.1, 1.2, 2)
# Should return:
# n1 n2
# 53 106
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.