rv (version 2.3.4)

rvquantile: Componentwise Quantiles of Random Variables

Description

Computes componentwise quantiles of random vectors or arrays.

Usage

rvquantile(x, ...)

# S3 method for rv rvquantile( x, probs = c(0.025, 0.1, 0.25, 0.5, 0.75, 0.9, 0.975), ignoreInf = FALSE, ... )

Arguments

x

an object

further arguments passed to quantile

probs

numeric vector of probabilities with values in [0,1]

ignoreInf

ignore infinite values

Value

A numeric vector of quantiles.

Details

rvquantile applies the quantile function to each column of sims(x).

rvmedian applies median to the each column of sims(x).

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").

Examples

Run this code
# NOT RUN {
  x <- rvnorm(3)
  rvquantile(x)
  rvquantile(x, probs=c(0, 0.01, 0.99, 1))
  rvmedian(x)

# }

Run the code above in your browser using DataCamp Workspace