Learn R Programming

uwo4419 (version 0.3.0)

confidenceInterval: Confidence Interval

Description

Make a confidence interval for the mean of a vector of values.

Usage

confidenceInterval(x, confidence = 0.95, na.rm = TRUE, distr = c("normal", "t"))

Arguments

x

A vector of values for which the mean and its confidence interval will be calculated.

confidence

Desired level of confidence for the confidence interval. Defaults to 0.95.

na.rm

Logical indicating whether missing observations should be removed. Defaults to TRUE.

distr

Distribution used to find the critical value. Default is "normal".

Value

A vector of values giving the mean, confidence interval and standard error.

Examples

Run this code
# NOT RUN {
data(alberta)
confidenceInterval(alberta$k7)
# }

Run the code above in your browser using DataLab