size.ci.median | R Documentation |
Computes the sample size required to estimate a population median with desired confidence interval precision. Set the variance planning value to the largest value within a plausible range for a conservatively large sample size. The sample size requirement depends on the shape of the distribution. Select one of the four distribution options (Normal, Logistic, Laplace, Exponential) that approximates the most likely distribution shape in the planned study. Select the Normal distribution for a conservatively large sample size requirement.
size.ci.median(alpha, var, w, dist)
alpha |
alpha level for 1-alpha confidence |
var |
planning value of response variable variance |
w |
desired confidence interval width |
dist |
|
Returns the required sample size
Bonett2002statpsych
size.ci.median(.05, 264.4, 10, 1)
# Should return:
# Sample size
# 64
size.ci.median(.05, 264.4, 10, 3)
# Should return:
# Sample size
# 21
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.