median.rv | R Documentation |
Compute the distribution sample median of the vector of values given as its argument.
## S3 method for class 'rv' median(x, na.rm = FALSE, ...)
x |
a randomv vector containing the components whose distribution of the median value is to be computed. |
na.rm |
a logical value indicating whether |
... |
further arguments passed to |
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")
.
rvmedian
for the componentwise medians.
quantile
for general quantiles.
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.