ci_sd: Confidence Interval for the Population Standard Deviation

Description Usage Arguments Value See Also Examples

View source: R/ci_sd.R

Description

This function calculates confidence intervals for the population standard deviation. They are derived by calculating confidence intervals for the variance and then taking the square-root. For details, see ci_var.

Usage

1
2
3
4
5
6
7
8
9
ci_sd(
  x,
  probs = c(0.025, 0.975),
  type = c("chi-squared", "bootstrap"),
  boot_type = c("bca", "perc", "stud", "norm", "basic"),
  R = 9999,
  seed = NULL,
  ...
)

Arguments

x

A numeric vector.

probs

Error probabilites. The default c(0.025, 0.975) gives a symmetric 95% confidence interval.

type

Type of confidence interval. One of "chi-squared" (default) or "bootstrap".

boot_type

Type of bootstrap confidence interval ("bca", "perc", "stud", "norm", "basic"). Only used for type = "bootstrap".

R

The number of bootstrap resamples. Only used for type = "bootstrap".

seed

An integer random seed. Only used for type = "bootstrap".

...

Further arguments passed to boot::boot.

Value

A list with class cint containing these components:

See Also

ci_var.

Examples

1
2
3
4
5
x <- 1:100
sd(x)
ci_sd(x)
sqrt(ci_var(x)$interval)
ci_sd(x, type = "bootstrap", R = 999)

confintr documentation built on July 2, 2020, 1:51 a.m.