size.ci.gen | R Documentation |
Computes the sample size required to estimate a single population parameter with desired precision using a standard error for the parameter estimate from a prior or pilot study. This function can be used with any type of parameter where the standard error of the parameter estimate is a function of the square root of the sample size (most parameter estimates have this property). This function also assumes that the sampling distribution of the parameter estimate is approximately normal in large samples.
size.ci.gen(alpha, se, n0, w)
alpha |
alpha level for hypothesis test |
se |
standard error of parameter estimate from prior/pilot study |
n0 |
sample size of prior/pilot study |
w |
desired confidence interval width |
Returns the required sample size
size.ci.gen(.05, 2.89, 30, 8)
# Should return:
# Sample size
# 61
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.