median.rv {rv}R Documentation

Distribution of the Sample Median

Description

Compute the distribution sample median of the vector of values given as its argument.

Usage

  median.rv(x, na.rm = FALSE)

Arguments

x a randomv vector containing the components whose distribution of the median value is to be computed.
na.rm a logical value indicating whether NA values should be stripped before the computation proceeds.

References

Kerman, Jouni and Gelman, Andrew. Manipulating and Summarizing Posterior Simulations Using Random Variable Objects. Technical report, Columbia University, New York.

See Also

rvmedian for the componentwise medians. quantile for general quantiles.

Examples

  x <- rvnorm(10) # A random vector.
  median.rv(x)       # A random scalar.
  rvmedian(x)     # A numeric vector of length 10.

[Package rv version 0.925 Index]