CImulen_data {exams.forge}R Documentation

Confidence Interval and Sample Size for the Population Mean Value

Description

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.

Usage

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
)

dcimulen(
  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
)

Arguments

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: c(0.9, 0.95, 0.99))

nmin

numeric: minimal value of necessary observation (default: 30)

size

numeric: sample size for computing a sample standard deviation. Default NA means that the solution of the estimation is used

u

numeric: vector of quantiles used to sample the sample standard deviation (default: c(seq(0.15, 0.45, 0.001), seq(0.55, 0.85, 0.001)))

full

logical: if TRUE then a data frame with possible solution is returned, otherwise a list with a randomly chosen solution is returned (default: FALSE)

Value

A data frame or a list with:

Examples

# 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)

[Package exams.forge version 1.0.10 Index]