confint: Confidence Intervals for Numeric Vectors

Description Usage Arguments Value Author(s) Examples

Description

Calculate confidence intervals for values of a numeric vector.

Usage

1
2
3
## S3 method for class 'numeric'
confint(object, parm = qnorm, level = 0.95, ...,
  na.rm = TRUE, ret.attr = TRUE)

Arguments

object

A numeric vector.

parm

Function for quantile calculation. e.g. qnorm, qt

level

Size of confidence (0 < size < 1).

...

Unused.

na.rm

Logical, remove missing values for sd and mean.

ret.attr

Logical, to include the mean value and function arguments as attributes of the returned object.

Value

Returns a numeric vector with the lower and upper range of the confidence interval.

Author(s)

Sven E. Templer

Examples

1
2
3
4
5
6
#

confint(1:3)
confint(1:3, ret.attr = FALSE)

#

Example output

[1] 1.131586
attr(,"mean")
[1] 2
attr(,"range")
[1] 0.8684143 3.1315857
attr(,"level")
[1] 0.975
attr(,"quantile")
function (p, mean = 0, sd = 1, lower.tail = TRUE, log.p = FALSE) 
.Call(C_qnorm, p, mean, sd, lower.tail, log.p)
<bytecode: 0x2f98ac0>
<environment: namespace:stats>
[1] 1.131586

miscset documentation built on May 2, 2019, 4:01 a.m.