ci_sd {confintr}R Documentation

Confidence Interval for the Population Standard Deviation

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

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

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

[Package confintr version 0.1.1 Index]