Learn R Programming

SciencesPo (version 1.3.9)

ci: An S4 Class to Confidence Intervals

Description

An S4 Class to Confidence Intervals

Calculates the confidence intervals for a vector of data values.

Usage

ci(x, level = 0.95, alpha = 1 - level, na.rm = FALSE, ...)

ci(x, level = 0.95, alpha = 1 - level, na.rm = FALSE, ...)

Arguments

x
A vector of data values.
level
The confidence level. Default is 0.95.
alpha
The significance level. Default is 1-level. If alpha equals 0.05, then your confidence level is 0.95.
na.rm
A logical value, default is FALSE
...
Additional arguements (currently ignored)

Value

  • CI lower
  • Est. MeanMean of data.
  • CI upperUpper bound of interval.
  • Std. ErrorStandard Error of the mean.

encoding

UTF-8

Examples

Run this code
x <- c(1, 2.3, 2, 3, 4, 8, 12, 43, -1,-4)

ci(x, level=.90)

Run the code above in your browser using DataLab