Skip to contents

Computes a confidence interval for a mean at a desired level of significance.

Usage

confidence(object, ...)

# S4 method for numeric
confidence(object, level = 0.95, type = c("student", "normal"))

Arguments

object

A numeric vector.

...

Currently not used.

level

A length-one numeric vector giving the confidence level. Must be a single number between \(0\) and \(1\).

type

A character string giving the type of confidence interval to be returned. It must be one "student" (the default) or "normal". Any unambiguous substring can be given.

Value

A length-two numeric vector giving lower and upper confidence limits.

See also

Other resampling methods: jackknife()

Author

N. Frerebeau

Examples

## Jackknife
x <- rnorm(20)
jackknife(x, do = mean) # Sample mean
#>      mean      bias     error 
#> 0.3388496 0.0000000 0.1729561