median.rv: Distribution of the Sample Median

Description Usage Arguments References See Also Examples

Description

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

Usage

1
2
  ## S3 method for class 'rv'
median(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, J. and Gelman, A. (2007). Manipulating and Summarizing Posterior Simulations Using Random Variable Objects. Statistics and Computing 17:3, 235-244.

See also vignette("rv").

See Also

rvmedian for the componentwise medians. quantile for general quantiles.

Examples

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


Search within the rv package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.