Description Usage Arguments Details Value Author(s) Examples
Sample size for the mean of a continuous variable, according to Cochran's formula
1 | CochranCont(alfa = 0.05, sigma, E, N = Inf, correct = FALSE)
|
alfa |
numeric, alfa error to use |
sigma |
numeric, standard deviation to use |
E |
numeric, Measurement Error |
N |
numeric, Size of the study population |
correct |
logical, if set to TRUE, it will check if the internally computed sample size is 5 per cent or bigger than the whole population, if this is the case, it will correct the sample size according to the formula n / (1 + n/N) |
n <- Zalpha^2 * sigma^2 / E^2
A list containing:
n |
numeric value with the sample size estimated for Measurement Error choosen. This value, rounded, is the only printed output |
Error |
numeric value of Measurement Error as it was set with 'E' argument |
alfa |
numeric value of alfa error as it was set with 'alfa' argument |
sigma |
numeric value of standard deviation as it was set with 'sigma' argument |
Evect |
vector of numeric values, with different alternative values of Measurement Error |
nvector |
vector of numeric values, with different alternative values of sample size estimated for the Evect values |
Miguel Menéndez
1 | size1 <- CochranCont(alfa = 0.05, sigma = 15, E = 2, N = 2000, correct = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.