R: Find Confidence Intervals

ci {distillery} | R Documentation

## Find Confidence Intervals

### Description

Method function for finding confidence intervals.

### Usage

    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

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

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

[Package distillery version 1.0-4 Index]