wc_width: Given confidence level, provide half-width of CI

View source: R/norm.R

wc_widthR Documentation

Given confidence level, provide half-width of CI

Description

(1-\alpha)100\% confidence intervals are of the form X \pm \eta|X-A| or (X + A)/2 \pm \eta|X-A|. You give \alpha and this function will provide \eta if X follows a Cauchy, normal, or uniform distribution.

Usage

wc_width(
  alpha,
  center = c("X", "ave", "approx"),
  family = c("normal", "cauchy", "uniform")
)

Arguments

alpha

The confidence error probability. We produce a (1-alpha)100 percent confidence interval.

center

Either X, ave, or the asymptotic width (approx).

family

Either the normal, Cauchy, or uniform distribution.

Value

Returns half-width of worst-case confidence interval in units of |X - A|.

Author(s)

David Gerard

Examples

wc_width(alpha = 0.2, center = "X")
wc_width(alpha = 0.2, center = "ave")
wc_width(alpha = 0.2, center = "approx")

wc_width(alpha = 0.05, center = "X")
wc_width(alpha = 0.05, center = "ave")
wc_width(alpha = 0.05, center = "approx")


nisone documentation built on Sept. 8, 2026, 5:08 p.m.