| CImulen_data | R Documentation |
Data generation for the necessary sample size of a confidence interval for the population mean value.
Either the estimation error e or the length of the interval l must be given (l=2*e).
It is ensured that the computed s deviates from sigma.
CImulen_data(
sigma,
e = NULL,
l = NULL,
conf.level = c(0.9, 0.95, 0.99),
nmin = 30,
size = NA,
u = c(seq(0.1, 0.4, 0.001), seq(0.6, 0.9, 0.001)),
full = FALSE
)
sigma |
numeric: vector of possible variance |
e |
numeric: vector of estimation errors |
l |
numeric: vector of lengths of the interval |
conf.level |
numeric: vector of confidence levels of the interval (default: |
nmin |
numeric: minimal value of necessary observation (default: |
size |
numeric: sample size for computing a sample standard deviation. Default |
u |
numeric: vector of quantiles to sample the sample standard deviation (default: |
full |
logical: if |
a data frame or a list with
e estimation error
sigma population variance
conf.level confidence level
l interval length
x 1-alpha/2
q z_{1-alpha/2}
q2 z^2_{1-alpha/2}
n computed minimal sample size
N the smallest integer not less than n
s sample standard deviation
# one solution
CImulen_data (1:10, e=(1:10)/10)
# all solutions
mul <- CImulen_data (1:10, e=(1:10)/10, full=TRUE)
str(mul)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.