Stan Math Library
4.9.0
Automatic Differentiation
|
|
inline |
Return sample quantiles corresponding to the given probabilities.
The smallest observation corresponds to a probability of 0 and the largest to a probability of 1.
Implements algorithm 7 from Hyndman, R. J. and Fan, Y., Sample quantiles in Statistical Packages (R's default quantile function)
T | An Eigen type with either fixed rows or columns at compile time, or std::vector<double> |
samples_vec | Numeric vector whose sample quantiles are wanted |
p | Probability with value between 0 and 1. |
std::invalid_argument | If any element of samples_vec is NaN, or size 0. |
std::domain_error | If p<0 or p>1 . |
Definition at line 32 of file quantile.hpp.