Student's t-distribution based confidence interval of mean

ci_mean_t(y, conf_level = 0.95, na.rm = TRUE, return_df = TRUE)

Arguments

y

(numeric) A numeric vector from which NAs will be removed automatically.

conf_level

(number) Confidence level. Number from 0 to 1. Default 0.95.

na.rm

(logical) If TRUE (default), missing values (NA's) are removed automatically.

return_df

(logical) If TRUE (default), result is returned as a data frame. If FALSE - as a matrix.

Value

An object (data frame or matrix) with a point estimate and confidence interval of mean.

Examples

set.seed(999555) y <- rnorm(35, 10, 5) ci_mean_t(y)
#> mean lower upper conf_level #> 1 10.40422 8.797069 12.01137 0.95
#