Learn R Programming

Publish (version 2023.01.17)

ci.mean.default: Compute mean values with confidence intervals

Description

Compute mean values with confidence intervals

Usage

# S3 method for default
ci.mean(
  x,
  alpha = 0.05,
  normal = TRUE,
  na.rm = TRUE,
  statistic = "arithmetic",
  ...
)

Value

a list with mean values and confidence limits

Arguments

x

numeric vector

alpha

level of significance

normal

If TRUE use quantile of t-distribution else use normal approximation and quantile of normal approximation. Do you think this is confusing?

na.rm

If TRUE remove missing values from x.

statistic

Decide which mean to compute: either "arithmetic" or "geometric"

...

not used

Author

Thomas Gerds

Details

Normal approximation