quantile_fn {BayesMoFo} | R Documentation |
A function to calculate sample quantiles
Description
Compute quantiles from posterior samples.
Usage
quantile_fn(x, probs)
Arguments
x |
a numeric vector. |
probs |
a numeric vector specifying which quantiles are to be computed. |
Value
A numeric vector giving the samples quantiles.
Examples
#generate random samples
x<-rnorm(1000)
#compute the 5th, 50th, 95th percentiles
quantile_fn(x,probs=c(0.05,0.5,0.95))
[Package BayesMoFo version 0.1.0 Index]