quantile.rv returns the distribution of the quantile of a random vector (as a random variable).

# S3 method for rv
quantile(x, ...)

Arguments

x

an object

...

further arguments passed to or from other methods

Value

A random vector (rv object) with components giving the distribution of the desired quantiles.

Note

quantile.rv does not return the simulated quantiles of the quantiles of the argument x. This is done by rvquantile.

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

Author

Jouni Kerman jouni@kerman.com

Examples


  x <- rvnorm(30)
  quantile(x)
#>     name  mean   sd    1%  2.5%   25%    50%   75% 97.5%   99% sims
#> [1]   0% -2.03 0.47 -3.17 -2.99 -2.33 -1.992 -1.71 -1.25 -1.18  200
#> [2]  25% -0.63 0.26 -1.26 -1.17 -0.79 -0.619 -0.45 -0.20 -0.15  200
#> [3]  50%  0.02 0.22 -0.43 -0.40 -0.16  0.028  0.19  0.42  0.46  200
#> [4]  75%  0.67 0.22  0.17  0.28  0.52  0.652  0.81  1.09  1.16  200
#> [5] 100%  2.10 0.55  1.08  1.16  1.71  2.107  2.42  3.27  3.60  200