ci.mean | R Documentation |
Calculates the "power" of a confidence interval for one mean, that is, the probability of achieving a 100(1 - alpha) percent confidence interval with halfwidth not greater than a specified value. Can solve for power, N or alpha.
ci.mean(
N = NULL,
halfwidth = NULL,
sd = 1,
alpha = 0.05,
power = NULL,
cond = FALSE,
v = FALSE
)
N |
The sample size. |
halfwidth |
The desired halfwidth. |
sd |
The estimated standard deviation; defaults to 1. |
alpha |
The significance level (type 1 error rate); defaults to 0.05. |
power |
The specified level of power. |
cond |
Specify whether to use unconditional or conditional probability. Defaults to FALSE (unconditional). |
v |
Either TRUE for verbose output or FALSE (default) to output computed argument only. |
The unconditional probability is the probability of obtaining the desired precision (i.e., that the observed halfwidth does not exceed the desired halfwidth) regardless of whether or not the confidence interval includes the true parameter value. The conditional probability is the probability of both obtaining the desired precision and having the interval include the true parameter value.
A list of the arguments (including the computed one).
ci.mean(N = NULL, halfwidth = 0.25, power = 0.8)
ci.mean(N = 62, halfwidth = 0.25, power = NULL)
ci.mean(N = 73, halfwidth = 0.25, cond = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.