quantile_fn: A function to calculate sample quantiles

View source: R/quantile_fn.R

quantile_fnR 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))

BayesMoFo documentation built on Aug. 11, 2025, 1:07 a.m.