# MedianCI

0th

Percentile

##### Confidence Interval for the Median

Calculates the confidence interval for the median.

Keywords
univar
##### Usage
MedianCI(x, conf.level = 0.95, sides = c("two.sided", "left", "right"), na.rm = FALSE, method = c("exact", "boot"), R = 999)
##### Arguments
x
a (non-empty) numeric vector of data values.
conf.level
confidence level of the interval
sides
a character string specifying the side of the confidence interval, must be one of "two.sided" (default), "left" or "right". You can specify just the initial letter. "left" would be analogue to a hypothesis of "greater" in a t.test.
na.rm
logical. Should missing values be removed? Defaults to FALSE.
method
defining the type of interval that should be calculated (one out of "exact", "boot"). Default is "exact". See Details.
R
The number of bootstrap replicates. Usually this will be a single positive integer. See boot.ci for details.
##### Details

The exact method is the way SAS is said to calculate the confidence interval. This is implemented in SignTest and is extracted from there. The boot confidence interval type is calculated by means of boot.ci with default type "basic". Use sapply, resp.apply, to get the confidence intervals from a data.frame or from a matrix.

##### Value

wilcox.test, MeanCI, median, HodgesLehmann

• MedianCI
##### Examples
MedianCI(d.pizza$price, na.rm=TRUE) MedianCI(d.pizza$price, conf.level=0.99, na.rm=TRUE)

t(round(sapply(d.pizza[,c("delivery_min","temperature","price")], MedianCI, na.rm=TRUE), 3))

MedianCI(d.pizza$price, na.rm=TRUE, method="exact") MedianCI(d.pizza$price, na.rm=TRUE, method="boot")

Documentation reproduced from package DescTools, version 0.99.19, License: GPL (>= 2)

### Community examples

Looks like there are no examples yet.