mean_ci: Confidence Interval of Mean

View source: R/mean_ci.R

mean_ciR Documentation

Confidence Interval of Mean

Description

Calculates confidence interval of a vector of numbers.

Usage

mean_ci(x, distance_only = TRUE, ci = 0.95)

Arguments

x

Numeric vector.

distance_only

Logical. If TRUE (default), the function returns only the distance between the mean and either confidence interval limit. Otherwise returns the confidence interval (i.e., both limits).

ci

Numeric; confidence level for returned CI.

Value

Distance of limit or confidence interval (as named vector).

See Also

se, plot_neat, sd_ci

Examples

myvec = c(11, 15, 19, 43, 53, -4, 34, 8, 33, -1, 54 )
mean_ci( myvec, FALSE )
mean_ci( myvec, FALSE, ci = .80 )
mean_ci( myvec, ci = .80 )


gasparl/neatstats documentation built on Jan. 10, 2023, 6:23 a.m.