ci_median {confintr}R Documentation

Confidence Interval for the Population Median

Description

This function calculates confidence intervals for the population median by calling ci_quantile(..., q = 0.5). See ci_quantile for details.

Usage

ci_median(
  x,
  probs = c(0.025, 0.975),
  type = c("binomial", "bootstrap"),
  boot_type = c("bca", "perc", "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 "binomial" (default), or "bootstrap".

boot_type

Type of bootstrap confidence interval ("bca", "perc", "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_quantile.

Examples

ci_median(1:100)
ci_quantile(1:100)

[Package confintr version 0.1.1 Index]