mean_CI: Construct the Confidence Interval for the Mean
Description
Constructs a confidence interval (CI) for the mean of a numeric vector using the
Student's t-distribution. The CI is calculated based on the specified degrees of
freedom, confidence level, and alternative hypothesis.
Usage
mean_CI(data, conf.level = 0.95, alternative = "two.sided")
Value
A named numeric vector with the mean and the lower and upper bounds
of the confidence interval.
Arguments
data
A numeric vector from which the mean and confidence interval
will be calculated.
conf.level
A numeric value representing the confidence level for the
confidence interval estimation. Default is 0.95.
alternative
The alternative hypothesis to be considered on the
confidence interval estimation.
Options are 'two.sided' (default), 'greater', or 'less'.