A confidence interval for the mean

meanConfInt(
  vector = NULL,
  mean = NULL,
  sd = NULL,
  n = NULL,
  se = NULL,
  conf.level = 0.95
)

# S3 method for meanConfInt
print(x, digits = 2, ...)

Arguments

vector

A vector with raw data points - either specify this or a mean and then either an sd and n or an se.

mean

A mean.

sd, n

A standard deviation and sample size; can be specified to compute the standard error.

se

The standard error (cna be specified instead of sd and n).

conf.level

The confidence level of the interval.

x, digits, ...

Respectively the object to print, the number of digits to round to, and any additonal arguments to pass on to the print function.

Value

And object with elements input, intermediate, and output, where output holds the result in list ci.

Examples

meanConfInt(mean=5, sd=2, n=20);
#>             ci.lo ci.hi
#> (mean=5.00)  4.06  5.94