ci: Find Confidence Intervals

Description Usage Arguments Details Value Author(s) Examples

View source: R/functions.R

Description

Method function for finding confidence intervals.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
ci(x, alpha = 0.05, ...)

## S3 method for class 'matrix'
ci(x, alpha = 0.05, ...)

## S3 method for class 'numeric'
ci(x, alpha = 0.05, ...)

## S3 method for class 'ci'
print(x, ...)

Arguments

x

ci: an R object that has a ci method function for it.

print: output from ci.

alpha

number between zero and one giving the 1 - alpha confidence level.

...

Optional arguments depending on the specific method function. In the case of those for ci.matrix and ci.numeric, these are any optional arguments to mean and var.

Not used by print method function.

Details

ci.numeric: Calculates the mean and normal approximation CIs for the mean.

ci.matrix: Does the same as ci.numeric, but applies to each column of x.

Value

ci.numeric: a numeric vector giving the CI bounds and mean value.

ci.matrix: a matrix giving the mean and CI bounds for each column of x.

Author(s)

Eric Gilleland

Examples

1
2
3
ci(rnorm(100, mean=10, sd=2))

ci(matrix(rnorm(10000, mean=40, sd=10), 100, 100))

distillery documentation built on May 19, 2021, 9:08 a.m.